Share via


DocumentBase.GridSpaceBetweenVerticalLines Property

Gets or sets the interval at which Microsoft Office Word displays vertical 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 GridSpaceBetweenVerticalLines As Integer
    Get
    Set
public int GridSpaceBetweenVerticalLines { get; set; }

Property Value

Type: System.Int32
The interval at which Microsoft Office Word displays vertical 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

See Also

Reference

DocumentBase Class

Microsoft.Office.Tools.Word Namespace