RelativeVerticalPosition Property

Microsoft Word Visual Basic

Specifies to what the vertical position of a frame, a shape, or a group of rows is relative. Read/write WdRelativeVerticalPosition.

Can be one of the following WdRelativeVerticalPosition constants.

wdRelativeVerticalPositionLine

wdRelativeVerticalPositionMargin

wdRelativeVerticalPositionPage

wdRelativeVerticalPositionParagraph.

Example

ShowAs it applies to the Frames object.

This example adds a frame around the selection and aligns the frame vertically with the top of the page.

Set myFrame = ActiveDocument.Frames.Add(Range:=Selection.Range)
With myFrame
    .RelativeVerticalPosition = wdRelativeVerticalPositionPage
    .VerticalPosition = wdFrameTop
End With
				

ShowAs it applies to the Shape object.

This example repositions the first shape object in the active document.

With ActiveDocument.Shapes(1)
    .Left = InchesToPoints(0.6)
    .RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
    .Top = InchesToPoints(1)
    .RelativeVerticalPosition = wdRelativeVerticalPositionParagraph
End With