MarginRight Property

Microsoft Publisher Visual Basic

expression.MarginRight

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

This example sets the margins of the active publication to two inches.

Sub SetPageMargins()

    With ActiveDocument.LayoutGuides
        .MarginTop = Application.InchesToPoints(Value:=2)
        .MarginBottom = Application.InchesToPoints(Value:=2)
        .MarginLeft = Application.InchesToPoints(Value:=2)
        .MarginRight = Application.InchesToPoints(Value:=2)
    End With

End Sub