Partager via


DocumentBase.GridOriginVertical Property

Definition

Gets or sets the point, relative to the top of the page, where you want the invisible grid for drawing, moving, and resizing AutoShapes or East Asian characters to begin in the document.

public:
 property float GridOriginVertical { float get(); void set(float value); };
public float GridOriginVertical { get; set; }
member this.GridOriginVertical : single with get, set
Public Property GridOriginVertical As Single

Property Value

The point, relative to the top of the page, where you want the invisible grid for drawing, moving, and resizing AutoShapes or East Asian characters to begin in the document.

Examples

The following code example sets the horizontal and vertical point of origin for the grid, sets the horizontal and vertical distance between gridlines, and then enables the Snap objects to grid feature for the document. To use this example, run it from the ThisDocument class in a document-level project.

private void DocumentGridDistanceHorizontal()
{
    this.GridOriginHorizontal = 80;
    this.GridOriginVertical = 90;
    this.GridDistanceHorizontal = 9;
    this.GridDistanceVertical = 9;
    this.SnapToGrid = true;
    this.Application.Options.DisplayGridLines = true;
}
Private Sub DocumentGridDistanceHorizontal()
    Me.GridOriginHorizontal = 80
    Me.GridOriginVertical = 90
    Me.GridDistanceHorizontal = 9
    Me.GridDistanceVertical = 9
    Me.SnapToGrid = True
    Me.Application.Options.DisplayGridLines = True
End Sub 

Remarks

GridOriginFromMargin must be false for this property to be used.

Applies to