DocumentBase.GridSpaceBetweenHorizontalLines Property

 

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

Namespace:   Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

public int GridSpaceBetweenHorizontalLines { get; set; }

Property Value

Type: System.Int32

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

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;
}
Return to top
Show: