This documentation is archived and is not being maintained.

Outlook Add-in Project Template

Visual Studio 2005

Note Required applications

The features in this topic are available only if you have the required applications installed.

For more information, see Features Available by Product Combination.

  • One of these development environments:

    VSTO 2005

    -or-

    Visual Studio Team System

  • Microsoft Office 2003

The Outlook Add-in project template automatically adds the necessary project references, files, and basic code to use as a starting point for your Microsoft Office Outlook 2003 add-in application.

NoteNote

This topic describes the Outlook Add-in project template that is included with Microsoft Visual Studio 2005 Tools for the Microsoft Office System. This project template is available when you select Office in the Project types pane of the New Project dialog box. For information about the Outlook Add-in project template for Outlook 2003 that is included with Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System, see 2003 Microsoft Office Add-in Project Templates. For information about the differences between these project templates, see Getting Started Programming Application-Level Add-ins.

NoteNote

Some of the files and references listed below are hidden by default. To see them, click Show All Files on the Solution Explorer toolbar. Additionally, there are some files and references not listed below that are common to many Visual Studio project templates.

The following methods are included in the project template code file.

Startup (ThisApplication_Startup)

This method handles the Startup event, which is raised after Outlook is running and all the initialization code in the assembly has been run. It is the last thing to run in the constructor of the class that your code is running in.

Shutdown(ThisApplication_Shutdown)

This method handles the Shutdown event, which is raised when the application domain that your code is loaded in is about to unload. It is the last thing to be called in the class as it unloads.

There is one user file that is visible by default.

  • ThisApplication(.vb file for Visual Basic or .cs file for Visual C#) - The main code file for the Outlook add-in.

Hidden Files

Microsoft Visual Studio 2005 Tools for the Microsoft Office System generates these hidden files. Do not modify these files manually; they are regenerated when changes are made to the project and they do not retain manual modifications.

  • ThisApplication.Designer.xml - A declarative representation of the programmable objects in the Outlook project.

  • ThisApplication.Designer (.vb file for Visual Basic or .cs file for Visual C#) - A code file that provides helper implementations, including code to instantiate objects correctly.

Microsoft Visual Studio 2005 Tools for the Microsoft Office System automatically creates the following references:

  • Microsoft.Office.Core - The primary interop assembly for shared Office components.

  • Stdole - The primary interop assembly for OLE automation.

  • Microsoft.Office.Tools.Outlook - Provides the base class for the ThisApplication class.

  • Microsoft.VisualStudio.Tools.Applications.Runtime - The component that loads the main project assembly in Outlook.

  • Microsoft .Net Framework assemblies - A collection of references to some of the Microsoft .NET Framework assemblies that are used when developing Visual Studio Tools for Office solutions.

Show: