RelativeHorizontalPosition Property
Applies To
Frame object, Shape object, ShapeRange collection object.
Description
Specifies what the horizontal position of a frame or shape is relative to. Can be one of the following WdRelativeHorizontalPosition constants: wdRelativeHorizontalPositionColumn, wdRelativeHorizontalPositionMargin, or wdRelativeHorizontalPositionPage. Read/write Long.
See Also
HorizontalPosition property, Left property.
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
This example repositions the selected shape object.
With Selection.ShapeRange
.Left = InchesToPoints(0.6)
.RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
.Top = InchesToPoints(1)
.RelativeVerticalPosition = wdRelativeVerticalPositionParagraph
End With