Getting Started Programming Application-Level Add-Ins
Applies to |
---|
The information in this topic applies only to the specified Visual Studio Tools for Office projects and versions of Microsoft Office. Project type
Microsoft Office version
For more information, see Features Available by Application and Project Type. |
You can use add-ins to automate Microsoft Office applications, extend features of the application, and customize the user interface (UI) of the application. For information about how add-ins compare to other types of solutions you can create by using Visual Studio Tools for Office, see Office Solutions Development Overview.
Creating Add-in Projects
Create add-in projects by using one of the project templates in the New Project dialog box. These templates include required assembly references and project files. Visual Studio Tools for Office provides add-in project templates for most applications in Microsoft Office 2003 and the 2007 Microsoft Office system. For a complete list of the supported applications, see Features Available by Application and Project Type.
For more information about how to create an add-in project, see How to: Create Visual Studio Tools for Office Projects. For more information about the project templates, see Visual Studio Tools for Office Project Templates Overview.
Developing Add-in Projects
When you create an add-in project, Visual Studio Tools for Office automatically creates a ThisAddIn.vb (in Visual Basic) or ThisAddIn.cs (in C#) code file. This file contains the ThisAddIn class, which provides the foundation for your add-in. You can use members of this class to run code when the add-in is loaded or unloaded, to access the object model of the host application, and to extend features of the application. For more information, see Programming Application-Level Add-Ins.
Automating Applications by Using the Object Models
The object models of Microsoft Office applications expose many types that you can program against in an add-in. You can use these types to automate the application. For example, you can programmatically create and send an e-mail message in Outlook, or you can open a document and add content in Word. For more information about how to access the object model of the host application in code, see Programming Application-Level Add-Ins.
For more information about the object models of specific Microsoft Office applications, see the following topics:
Customizing the User Interface of Applications
There are several different ways to customize the UI of the host application by using an add-in:
Starting in SP1, for Excel 2007 and Word 2007, you can add managed controls and smart tags to workbooks and documents. For more information, see Extending Word Documents and Excel Workbooks in Application-Level Add-ins at Run Time.
For applications in the 2007 Microsoft Office system, you can customize the Ribbon if the application supports it. For more information, see Ribbon Overview.
For applications in the 2007 Microsoft Office system, you can create a custom task pane if the application supports it. For more information, see Custom Task Panes Overview.
For Outlook 2007, you can create a custom form region. For more information, see Creating Outlook Form Regions.
For all Microsoft Office applications, you can display Windows Forms in your add-in. For more information, see How to: Interact with Windows Forms.
For Office applications that do not support the Ribbon, you can create your own menus and toolbars in the application. For more information, see How to: Create Office Menus Programmatically and How to: Create Office Toolbars Programmatically.
For more information about how to customize the UI of Microsoft Office applications, see Office UI Customization.
See Also
Tasks
How to: Create Visual Studio Tools for Office Projects
Walkthrough: Creating Your First Application-Level Add-in for Excel
Walkthrough: Creating Your First Application-Level Add-in for Outlook
Walkthrough: Creating Your First Application-Level Add-in for PowerPoint
Walkthrough: Creating Your First Application-Level Add-in for Project
Walkthrough: Creating Your First Application-Level Add-in for Word
Concepts
Architecture of Application-Level Add-Ins
Programming Application-Level Add-Ins
Other Resources
Getting Started (Visual Studio Tools for Office)
Change History
Date |
History |
Reason |
---|---|---|
August 2008 |
Added links to new walkthroughs. |
Information enhancement. |
July 2008 |
Added information about adding managed controls and smart tags to workbooks and documents. |
SP1 feature change. |