Share via


Frame.HorizontalPosition Property

Word Developer Reference

Returns or sets the horizontal distance between the edge of the frame and the item specified by the RelativeHorizontalPosition property. Read/write Single.

Syntax

expression.HorizontalPosition

expression   A variable that represents a Frame object.

Remarks

This property can be a number that indicates a measurement in points, or can be one of the WdFramePosition constants.

Example

This example aligns the first frame in the active document horizontally with the right margin.

Visual Basic for Applications
  If ActiveDocument.Frames.Count >= 1 Then
    With ActiveDocument.Frames(1)
        .RelativeHorizontalPosition = _
            wdRelativeHorizontalPositionMargin
        .HorizontalPosition = wdFrameRight
    End With
End If

See Also