COMAddIns property

Microsoft Visio Developer Reference

COMAddIns property

See also       

Returns a reference to the COMAddIns collection that represents all the Component Object Model (COM) add-ins currently registered in Microsoft Visio.

Version added

2002

Syntax

objsRet = object.COMAddIns

objsRet

A collection of COMAddIn objects that provide information about a COM add-in registered in the registry.

object

Required. An expression that returns an Application object.

Remarks

The COM add-ins that are currently registered are listed in the COM Add-Ins dialog box (on the Tools menu, point to Macros, and then click COM Add-ins).

To get information about the object returned by the COMAddIns property:

  1. On the Tools menu, point to Macros, and then click Visual Basic Editor.
  1. On the View menu, click Object Browser.
  1. In the Project/Library list, click Office.

If you do not see the Office type library in the Project/Library list, on the Tools menu, click References, select the Microsoft Office 10.0 Object Library check box, and then click OK.

  1. Under Classes, examine the class named COMAddIns.

Example

'This macro demonstrates using the COMAddIns property
'to list the COM add-ins registered with Visio.
Public Sub IterateCOMAddIns()

    Dim myCOMAddIns As COMAddIns
    Dim myCOMAddIn As COMAddIn

    'Get the set of COM add-ins
    Set myCOMAddIns = Application.COMAddIns

    'List each COM add-in in the
    'Immediate window
    For Each myCOMAddIn In myCOMAddIns
        Debug.Print myCOMAddIn.Description
    Next

End Sub