RightMargin Property 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)