Window.DisplayRulers property (Word)
True if rulers are displayed for the specified window or pane. Read/write Boolean.
Syntax
expression. DisplayRulers
expression A variable that represents a Window object.
Remarks
This property is equivalent to the Ruler command on the View menu. If DisplayRulers is False, the horizontal and vertical rulers won't be displayed, regardless of the state of the DisplayVerticalRuler property.
Example
This example toggles the ruler display for the active window.
ActiveDocument.ActiveWindow.DisplayRulers = _
Not ActiveDocument.ActiveWindow.DisplayRulers
This example switches the window to print layout view and displays the horizontal and vertical rulers.
With ActiveDocument.ActiveWindow
.View.Type = wdPrintView
.DisplayVerticalRuler = True
.DisplayRulers = True
End With
See also
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.