COMAddIn Object
COMAddIn Object
Represents a COM add-in in the Microsoft Office host application. The COMAddIn object is a member of the COMAddIns collection.

Example

Use COMAddIns.Item(index), where

index is either an ordinal value that returns the COM add-in at that position in the COMAddIns collection, or a String value that represents the ProgID of the specified COM add-in. The following example displays a COM add-in’s description text in a message box.
Visual Basic for Applications
MsgBox Application.COMAddIns.Item("msodraa9.ShapeSelect").Description

Use the ProgID property of the COMAddin object to return the programmatic identifier for a COM add-in, and use the Guid property to return the globally unique identifier (GUID) for the add-in. The following example displays the ProgID and GUID for COM add-in one in a message box.

Visual Basic for Applications
MsgBox "My ProgID is " & _
    Application.COMAddIns(1).ProgID & _
    " and my GUID is " & _
    Application.COMAddIns(1).Guid

Use the Connect property to set or return the state of the connection to a specified COM add-in. The following example displays a message box that indicates whether COM add-in one is registered and currently connected.

Visual Basic for Applications
If Application.COMAddIns(1).Connect Then
    MsgBox "The add-in is connected."
Else
MsgBox "The add-in is not connected."
End If



© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View