DocSize Method
Sets the width and height of the active window.
Syntax
*expression *.DocSize(Width, Height, Points)
*expression * Optional. An expression that returns an Application object.
Width Optional Long. A number that specifies the new width of the active window.
Height Optional Long. A number that specifies the new height of the active window.
Points Optional Boolean. True if Width and Height are measured in points. False if they are measured in pixels. The default value is False.
Example
The following example tiles the windows of open projects vertically within the main window of Microsoft Office Project 2003.
Sub TileProjectWindowsVertically()
Dim I As Long ' Index used in For...Next loop
For I = 1 To Application.Windows.Count
Windows(I).Activate
DocSize Width:=UsableWidth / Windows.Count, Height:=UsableHeight, Points:=True
DocMove XPosition:=(I - 1) * UsableWidth / Windows.Count, YPosition:=0, Points:=True
Next I
End Sub
Applies to | Application Object
See Also | DocClose Method | DocMaximize Method | DocMove Method | DocRestore Method