Compartilhar via


DocumentBase.GridSpaceBetweenHorizontalLines Property

Definition

Gets or sets the interval at which Microsoft Office Word displays horizontal character gridlines in print layout view.

public:
 property int GridSpaceBetweenHorizontalLines { int get(); void set(int value); };
public int GridSpaceBetweenHorizontalLines { get; set; }
member this.GridSpaceBetweenHorizontalLines : int with get, set
Public Property GridSpaceBetweenHorizontalLines As Integer

Property Value

The interval at which Microsoft Office Word displays horizontal character gridlines in print layout view.

Examples

The following code example sets Word to display every fifth horizontal character gridline and every second vertical character gridline. The code then displays the gridlines in the document. To use this example, run it from the ThisDocument class in a document-level project.

private void DocumentGridSpaceBetweenHorizontalLines()
{
    this.GridSpaceBetweenHorizontalLines = 5;
    this.GridSpaceBetweenVerticalLines = 2;
    this.Application.Options.DisplayGridLines = true;
}
Private Sub DocumentGridSpaceBetweenHorizontalLines()
    Me.GridSpaceBetweenHorizontalLines = 5
    Me.GridSpaceBetweenVerticalLines = 2
    Me.Application.Options.DisplayGridLines = True
End Sub

Applies to