Michelle Haarhues shows two ways to script out database objects in SQL Server Management Studio:
There are a multitude of reasons why users script existing objects within SQL Server. Depending on the reason will dictate whether you are scripting one object, a few objects, or the entire database. There are different tools within SQL Server Management Studio (SSMS) that will help you create object scripts.
Click through for the two methods.