View.DisplayPageBoundaries property (Word)

True to display the top and bottom margins (white space) and the gray area (gray space) between pages in a document. Read/write Boolean.

Syntax

expression. DisplayPageBoundaries

expression An expression that returns a 'View' object.

Remarks

False to hide from view the white and gray space so that the pages flow together as one long page. The default value is True.

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

See also

View Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.