Visual Studio Tools for Office provides the following types of project templates:
Document-level customizations.
Application-level add-ins.
SharePoint workflow templates.
InfoPath form templates.
To decide which of these project types is best for your solution, think about whether you want your code to run only when a specific document is open, or whether you want the code to be available whenever the Microsoft Office application is running. For more information about the project templates, see Visual Studio Tools for Office Project Templates Overview.
The types of projects you can create depend on which Microsoft Office applications you have installed on the development computer. For more information, see Features Available by Application and Project Type.
Document-Level Customizations
Document-level customizations consist of an assembly that is associated with a single document, workbook, or template in Microsoft Office Word or Microsoft Office Excel. The assembly is loaded when the associated document is opened. Features in customizations that you create are available only when the associated document is open. Customizations cannot make application-wide changes, such as displaying a new menu item or Ribbon tab when any document is open.
Visual Studio Tools for Office includes tools to help you create customizations in Visual Studio. The document that you customize is hosted as a design surface in Visual Studio, which enables you to design the document by dragging and dropping controls onto it. Many other Visual Studio features are available in document-level projects, such as Windows Forms controls, data binding, and an integrated debugger.
For more information about customizations, see Getting Started Programming Document-Level Customizations for Excel, Getting Started Programming Document-Level Customizations for Word, and Architecture of Document-Level Customizations.
Application-Level Add-Ins
Application-level add-ins consist of an assembly that is associated with a Microsoft Office application. Typically, the add-in runs when the associated application is started, although users can also load add-ins after the application is already running. Features in add-ins that you create are available to the application itself, regardless of which documents are open.
Visual Studio Tools for Office includes tools to help you create add-ins in Visual Studio. Add-in projects include an automatically generated class that represents the add-in. This class provides properties and events you can use to access the object model of the host application and run code when the add-in is loaded and shut down. Many other Visual Studio features are available in application-level projects, such as Windows Forms and an integrated debugger.
For more information about add-ins, see Getting Started Programming Application-Level Add-Ins and Architecture of Application-Level Add-Ins.
SharePoint Workflow Templates
Visual Studio Tools for Office provides tools to help you create custom workflow templates that manage the life cycle of documents and list items in a SharePoint Web site. Visual Studio Tools for Office includes a workflow designer, a complete set of drag-and-drop activity controls, and the necessary assembly references. You start a project by using the New Office SharePoint Workflow wizard, which significantly reduces the configuration steps that are required to debug the workflow template in Visual Studio.
For more information about SharePoint workflow templates, see SharePoint Workflow Solutions.
InfoPath Form Templates
Visual Studio Tools for Office provides tools to help you create form templates for InfoPath 2007. The InfoPath form template design environment is fully integrated into the Visual Studio development environment. You can work with the features of InfoPath 2007 to design the look of your InfoPath form template at the same time that you write managed code to extend its capabilities without leaving Visual Studio. When you work with InfoPath form templates in Visual Studio, you write business logic in Visual C# or Visual Basic against either the InfoPath 2003-compatible object model (members of the Microsoft.Office.Interop.InfoPath.SemiTrust namespace) or the new InfoPath 2007 managed code object model (members of the Microsoft.Office.InfoPath namespace).
For more information, see Developing InfoPath Managed Code Form Templates.