Frame.RelativeHorizontalPosition property (Word)
Specifies the relative horizontal position of a frame. Read/write WdRelativeHorizontalPosition.
expression. RelativeHorizontalPosition
expression An expression that represents a 'Frame' object.
This example adds a frame around the selection and aligns the frame horizontally with the right margin.
Set myFrame = ActiveDocument.Frames.Add(Range:=Selection.Range)
With myFrame
.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionMargin
.HorizontalPosition = wdFrameRight
End With
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.