Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Application.ActiveWindow Method

Office 2007
Returns an object representing the topmost Microsoft Outlook window on the desktop, either an Explorer or an Inspector object.



expression   A variable that represents an Application object.

Return Value
An Object that represents the topmost Microsoft Outlook window on the desktop. Returns Nothing if no Outlook explorer or inspector is open.


This Microsoft Visual Basic/Visual Basic for Applications (VBA) example minimizes the topmost Outlook window if it is an inspector window.

Visual Basic for Applications
Sub MinimizeActiveWindow()
    If TypeName(Application.ActiveWindow) = "Inspector" Then
        Application.ActiveWindow.WindowState = olMinimized
    End If
End Sub

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.