Export (0) Print
Expand All

ActiveWindow Method

Office 2003

Returns an object representing the topmost Microsoft Outlook window on the desktop, either an Explorer or an Inspector object. If no Outlook explorer or inspector is open, returns Nothing.

expression.ActiveWindow

expression    Required. An expression that returns an Application object.

Example

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

Sub MinimizeActiveWindow()
	Dim myOlApp As New Outlook.Application
	If TypeName(myOlApp.ActiveWindow) = "Inspector" Then
		myOlApp.ActiveWindow.WindowState = olMinimized
	End If
End Sub
		


Applies to | Application Object



Show:
© 2014 Microsoft