Task.WindowState Property

Word Developer Reference

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.

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

See Also