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

  • Application-level projects

Microsoft Office version

  • Excel 2003 and 2007

  • InfoPath 2007

  • Outlook 2003 and 2007

  • PowerPoint 2003 and 2007

  • Project 2003 and 2007

  • Visio 2003 and 2007

  • Word 2003 and 2007

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:

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

Getting Started Writing Code

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.