The WindowState property returns or specifies the state of a window. A window can be minimized or maximized, or it can be in a normal state. It can also be restored to its previous state. The WindowState property returns a value of cdrWindowState.
Examples:
The following VBA example displays the active window's state, maximizes the window, and displays the new state.
Sub Test()
MsgBox "The current window state is: " & ActiveWindow.WindowState
ActiveWindow.WindowState = cdrWindowMaximized
MsgBox "The current window state is: " & ActiveWindow.WindowState
End Sub