Share via


Task.WindowState Property (Word)

Returns or sets the state of the specified document window or task window. Read/write WdWindowState.

Syntax

expression .WindowState

expression Required. A variable that represents a Task object.

Example

This example minimizes the Microsoft Excel application window.

For Each myTask In Tasks 
 If InStr(myTask.Name, "Microsoft Excel") > 0 Then 
 myTask.Activate 
 myTask.WindowState = wdWindowStateMinimize 
 End If 
Next myTask

See Also

Concepts

Task Object Members

Task Object