DisplayPageBoundaries Property

Microsoft Word Visual Basic

expression.DisplayPageBoundaries

expression    Required. An expression that returns a View object.

Remarks

This feature is only available in the Print Layout view and only affects the gray space on the top and bottom of a page, not the left and right sides of a page. This setting affects the document in the in the specified window. When the document is saved, the state of this setting is saved with it.

Example

This example changes the current view to Print Layout and suppresses the white and gray space between document pages.

Sub WhiteSpace()
    With ActiveWindow.View
        .Type = wdPrintView
        .DisplayPageBoundaries = False
    End With
End Sub