Frame.HorizontalPosition property (Word)

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.

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

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.