Printer Friendly Version      Send     
Click to Rate and Give Feedback
MSDN
MSDN Library
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Visual Studio Tools for the Microsoft Office System
Outlook Add-in Project Template

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

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.

© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker