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)

Syntax

'Declaration
Public Class AddIn _
    Inherits EntryPointBindableComponentBase _
    Implements ISupportInitializeControl, ISupportInitialize, IServiceProviderCallback, IComAddInAutomationServiceProviderCallback
'Usage
Dim instance As AddIn
public class AddIn : EntryPointBindableComponentBase, ISupportInitializeControl, 
    ISupportInitialize, IServiceProviderCallback, IComAddInAutomationServiceProviderCallback
public ref class AddIn : public EntryPointBindableComponentBase, 
    ISupportInitializeControl, ISupportInitialize, IServiceProviderCallback, IComAddInAutomationServiceProviderCallback
public class AddIn extends EntryPointBindableComponentBase implements ISupportInitializeControl, ISupportInitialize, IServiceProviderCallback, IComAddInAutomationServiceProviderCallback

Remarks

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.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Tools.Office.RemoteComponent
    Microsoft.VisualStudio.Tools.Office.EntryPointComponentBase
      Microsoft.VisualStudio.Tools.Office.EntryPointBindableComponentBase
        Microsoft.Office.Tools.AddIn
          Microsoft.Office.Tools.Outlook.OutlookAddIn

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

AddIn Members

Microsoft.Office.Tools Namespace

Other Resources

Programming Application-Level Add-Ins

AddIn Host Item

Getting Started Programming Application-Level Add-Ins

Visual Studio Tools for Office Project Events