Use the Document object to modify the position and size of any document window.
The Document window can be minimized or maximized by using the WindowState property, and you can find the current state of the Document window by using the WindowState property.
This example uses the Width and Height properties to set the active Document window to 400 pixels wide by 400 pixels high.
Sub Ch3_SizeDocumentWindow() ThisDrawing.Width = 400 ThisDrawing.Height = 400 End Sub
Sub Ch3_MaximizeDocumentWindow() ThisDrawing.WindowState = acMax End Sub
Sub Ch3_MinimizeDocumentWindow() ThisDrawing.WindowState = acMin End Sub
Sub Ch3_CurrentWindowState() Dim CurrWindowState As Integer Dim msg As String CurrWindowState = ThisDrawing.WindowState msg = Choose(CurrWindowState, "normal", "minimized", "maximized") MsgBox "The document window is " + msg End Sub