SnapToGrid Property

Microsoft Word Visual Basic

Document object: True if AutoShapes or East Asian characters are automatically aligned with an invisible grid when they are drawn, moved, or resized in the specified document. Read/write Boolean.

Options object: True if AutoShapes or East Asian characters are automatically aligned with an invisible grid when they are drawn, moved, or resized in new documents. Read/write Boolean.

Remarks

You can temporarily override this setting by pressing ALT while drawing, moving, or resizing an AutoShape.

Example

This example sets Microsoft Word to automatically align East Asian characters with the invisible grid in the current document.

ActiveDocument.SnapToGrid = True
		

This example sets Word so that AutoShapes are automatically aligned with the invisible grid in a new document.

Options.SnapToGrid = True
Documents.Add
		

This example returns the status of the Snap to grid option in the Snap to Grid dialog box (Drawing toolbar, Draw menu, Grid command).

Temp = Options.SnapToGrid