Partager via


Application.Inspectors Property (Outlook)

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.

Private Sub CommandButton1_Click() 
 
 Dim myInspectors As Outlook.Inspectors 
 
 Dim x as Integer 
 
 Dim iCount As Integer 
 
 
 
 Set myInspectors = Application.Inspectors 
 
 iCount = Application.Inspectors.Count 
 
 If iCount > 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

Concepts

Application Object

Application Object Members