Syntax
DocMove HorizPos, VertPos
Remarks
Moves the active document window or icon to the specified location. If the active document is maximized, Word cannot perform this action and generates an error.
Argument | Explanation | |
HorizPos, VertPos | The horizontal (HorizPos) and vertical (VertPos) distance from the upper-left corner of the workspace to the upper-left corner of the document window, in points (72 points = 1 inch). Negative values are allowed. |
Example
This example moves the document window to the position 20 points to the right and 40 points down from the upper-left corner of the workspace:
If DocMaximize() = 0 Then DocMove 20, 40
See Also
AppMove, DocSize, DocWindowPosLeft, DocWindowPosTop