PageSetup.RightMargin property (Word)
Returns or sets the distance (in points) between the right edge of the page and the right boundary of the body text. Read/write Single.
Syntax
expression.RightMargin
expression A variable that represents a PageSetup object.
Remarks
If the MirrorMargins property is set to True, the RightMargin property controls the setting for outside margins and the LeftMargin property controls the setting for inside margins.
Example
This example displays the right margin setting for the active document. The PointsToInches method is used to convert the result to inches.
With ActiveDocument.PageSetup
Msgbox "The right margin is set to " _
& PointsToInches(.RightMargin) & " inches."
End With
This example sets the right margin for section two in the selection. The InchesToPoints method is used to convert inches to points.
Selection.Sections(2).PageSetup.RightMargin = InchesToPoints(1)
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.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for