Application.ActiveInspector Method

Outlook Developer Reference

Returns the topmost Inspector object on the desktop.



expression   A variable that represents an Application object.

Return Value
An Inspector that represents the topmost inspector on the desktop.


Use this method to access the Inspector object that the user is most likely to be viewing.

If no inspector is active, returns Nothing.


This Visual Basic for Applications (VBA) example uses the ActiveInspector method to obtain the currently active Inspector object and enables the display of keys in ToolTips in the inspector.

Visual Basic for Applications
  Sub DisplayKeys()
    'Enables key in ToolTips
    Dim myinspector As Outlook.Inspector
    Set myinspector = Application.ActiveInspector
    'Test if an inspector is active
    If Not TypeName(myinspector) = "Nothing" Then
        myinspector.CommandBars.DisplayKeysInTooltips = True
    End If
End Sub

See Also