COMAddIns Property Example

This Microsoft Visual Basic example displays the number of COM add-ins currently connected.

Dim myOlApp As New Outlook.Application
Private Sub Command1_Click()
    MsgBox "There are " & _
        myOlApp.COMAddIns.Count & " COM add-ins."
End Sub

If you use VBScript, you do not declare an Application object variable. This example shows how to perform the same task using VBScript.

Sub Commandbutton1_Click()
    MsgBox "There are " & _
       Application.COMAddIns.Count & " COM add-ins."
End Sub