Application.Inspectors property (Outlook)
expression A variable that represents an Application object.
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
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.