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)
Syntax
'Declaration
Public Property GridSpaceBetweenHorizontalLines As Integer
Get
Set
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.
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 Sub DocumentGridSpaceBetweenHorizontalLines()
Me.GridSpaceBetweenHorizontalLines = 5
Me.GridSpaceBetweenVerticalLines = 2
Me.Application.Options.DisplayGridLines = True
End Sub
private void DocumentGridSpaceBetweenHorizontalLines()
{
this.GridSpaceBetweenHorizontalLines = 5;
this.GridSpaceBetweenVerticalLines = 2;
this.Application.Options.DisplayGridLines = true;
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.