Share via


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

Concepts

Explorer Object

Explorer Object Members