Explorer.WindowState property (Outlook)

Returns or sets the property with a constant in the OlWindowState enumeration specifying the window state of an explorer or inspector window. Read/write.

Syntax

expression.WindowState

expression A variable that represents an Explorer object.

Example

This Microsoft Visual Basic for Applications example minimizes all open explorer windows. It uses the Count property and Item method of the Explorers collection to enumerate the open explorer windows.

Sub MinimizeWindows() 
 
 Dim myOlExp As Outlook.Explorer 
 
 Dim myOlExps As Outlook.Explorers 
 
 
 
 Set myOlExps = Application.Explorers 
 
 For x = 1 To myOlExps.Count 
 
 myOlExps.Item(x).WindowState = olMinimized 
 
 Next x 
 
End Sub

See also

Explorer Object

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.