DocSize

Syntax

DocSize Width, Height

Remarks

Sizes the active document window to the specified Width and Height, in points
(72 points = 1 inch). If the active document is maximized or minimized, Word cannot perform this action and generates an error. Note that this statement must have arguments for both the width and height of the window. To size only the width or height of a window, use DocWindowWidth or DocWindowHeight.

Example

This example ensures that the active document window is restored and then sizes it to half the width of the workspace:


If DocMaximize() or DocMinimize() Then DocRestore
DocSize(Val(AppInfo$(6)) / 2), Val(AppInfo$(7))

See Also

AppInfo$(), AppSize, DocWindowHeight, DocWindowWidth