Frame.RelativeHorizontalPosition property (Word)

Specifies the relative horizontal position of a frame. Read/write WdRelativeHorizontalPosition.

Syntax

expression. RelativeHorizontalPosition

expression An expression that represents a 'Frame' object.

Example

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

See also

Frame Object

Support and feedback

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.