GridDistanceVertical Property

Microsoft Word Visual Basic

Document object: Returns or sets the amount of vertical space between the invisible gridlines that Microsoft Word uses when you draw, move, and resize AutoShapes or East Asian characters in the specified document. Read/write Single.

Options object: Returns or sets the amount of vertical space between the invisible gridlines that Word uses when you draw, move, and resize AutoShapes or East Asian characters in new documents. Read/write Single.

Example

This example sets the horizontal and vertical distance between gridlines and then enables the Snap objects to grid feature for the current document.

With ActiveDocument
    .GridDistanceHorizontal = 9
    .GridDistanceVertical = 9
    .SnapToGrid = True
End With
		

This example sets the horizontal and vertical distance between gridlines and then enables the Snap objects to grid feature for a new document.

With Options
    .GridDistanceHorizontal = InchesToPoints(0.2)
    .GridDistanceVertical = InchesToPoints(0.2)
    .SnapToGrid = True
End With
Documents.Add