RelativeHorizontalPosition 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