Application.ActiveWindow Method (Outlook)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

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

expression .ActiveWindow

expression A variable that represents an Application object.

Return Value

An Object that represents the current Outlook window on the desktop. Returns Nothing if no Outlook explorer or inspector is open.

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

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