Application.Inspectors Property

Outlook Developer Reference

Returns an Inspectors collection object that contains the Inspector objects representing all open inspectors. Read-only.

Syntax

expression.Inspectors

expression   A variable that represents an Application object.

Example

This Microsoft Visual Basic example uses the Inspectors property and the Count property and Item method of the Inspectors object to display the captions of all inspector windows.

Visual Basic for Applications
  Private Sub CommandButton1_Click()
    Dim myInspectors As Outlook.Inspectors
    Dim x as Integer
    Dim iCount As Integer
Set myInspectors = Application.<strong class="bterm">Inspectors</strong>
iCount = Application.<strong class="bterm">Inspectors</strong>.Count
If iCount &gt; 0 Then
    For x = 1 To iCount
        MsgBox myInspectors.Item(x).Caption
    Next x
Else
    MsgBox "No inspector windows are open."
End If

End Sub

See Also