This documentation is archived and is not being maintained.

TextFrame.MarginRight Property

Office 2007
Returns or sets a Variant that represents the amount of space (in points) between the text and the right edge of a cell, text frame, or page. Read/write.

Syntax

expression.MarginRight

expression   A variable that represents a TextFrame object.

Example

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

Visual Basic for Applications
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



Show: