Rediger

Del 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

Application Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.