DrawSnapToGrid

Syntax

DrawSnapToGrid .SnapToGrid = number [, .XGrid = number or text] [, .YGrid = number or text] [, .XOrigin = number or text] [, .YOrigin = number or text]

Remarks

Establishes a grid that restricts where drawing objects may be positioned and how they may be sized. A grid is useful when you want to align and connect drawing objects. The arguments for DrawSnapToGrid correspond to the options in the Snap To Grid dialog box (Snap To Grid button, Drawing toolbar).

Argument

Explanation

.SnapToGrid

If 1, activates the restriction on positioning drawing objects.

.XGrid

The distance, in points or a text measurement, between vertical gridlines (in other words, the increments in which drawing objects can be positioned horizontally).

.YGrid

The distance, in points or a text measurement, between horizontal gridlines (in other words, the increments in which drawing objects can be positioned vertically).

.XOrigin

The distance, in points or a text measurement, from the left edge of the page to the vertical gridline you want Word to use when laying out all other vertical gridlines. Specifying 0 (zero) or a multiple of the .XGrid measurement has no effect.

.YOrigin

The distance, in points or a text measurement, from the top edge of the page to the horizontal gridline you want Word to use when laying out all other horizontal gridlines. Specifying 0 (zero) or a multiple of the .YGrid measurement has no effect.


See Also

DrawAlign