Click to Rate and Give Feedback

  Switch on low bandwidth view
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 Office API Reference
AddIn Class (2007 System)

Provides core functionality for an add-in for a Microsoft Office application.

Namespace:  Microsoft.Office.Tools
Assembly:  Microsoft.Office.Tools.Common.v9.0 (in Microsoft.Office.Tools.Common.v9.0.dll)
Visual Basic (Declaration)
Public Class AddIn _
    Inherits EntryPointBindableComponentBase _
    Implements ISupportInitializeControl, ISupportInitialize, IServiceProviderCallback, IComAddInAutomationServiceProviderCallback
Visual Basic (Usage)
Dim instance As AddIn
C#
public class AddIn : EntryPointBindableComponentBase, ISupportInitializeControl, 
    ISupportInitialize, IServiceProviderCallback, IComAddInAutomationServiceProviderCallback

The AddIn class is the host item for application-level add-ins that you create by using Visual Studio Tools for Office. When you create an add-in project, Visual Studio Tools for Office automatically creates a class named ThisAddIn, which derives from AddIn. The ThisAddIn class provides a starting location in which you can write your code. You can access the object model of the host application by using the Application field of the ThisAddIn class. For more information about the ThisAddIn class, see Programming Application-Level Add-Ins and AddIn Host Item.

To run code when the add-in is loaded or unloaded, add code to the ThisAddIn_Startup and ThisAddIn_Shutdown methods in the ThisAddIn class. These methods are default event handlers for the Startup and Shutdown events. For more information, see Visual Studio Tools for Office Project Events.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker