Hello Dave,
ShapeRange in Word Object Model means a set of shapes on a document. So do
you mean set a Shape's vertical and horizontal alignment? If that is the
case,
we can set it via Shape.Left and Shape.Top to the following enumerations,
wdShapeBottom At the bottom.
wdShapeCenter In the center.
wdShapeInside Inside the selected range.
wdShapeLeft On the left.
wdShapeOutside Outside the selected range.
wdShapeRight On the right.
wdShapeTop At the top.
We can also set Shape.RelativeHorizontalPosition and
RelativeVerticalPosition to specify the what the Left and Top properties
are relative to. It can be the following enumerations,
wdRelativeHorizontalPositionCharacter 3 Relative to character.
wdRelativeHorizontalPositionColumn 2 Relative to column.
wdRelativeHorizontalPositionMargin 0 Relative to margin.
wdRelativeHorizontalPositionPage 1 Relative to page.
wdRelativeHorizontalPositionInnerMarginArea 6 Relative to inner margin
area.
wdRelativeHorizontalPositionLeftMarginArea 4 Relative to left margin.
wdRelativeHorizontalPositionOuterMarginArea 7 Relative to outer margin
area.
wdRelativeHorizontalPositionRightMarginArea 5 Relative to right margin.
For examples, the following codes set it a shape to top center of the page,
Sub Test()
ThisDocument.Shapes(1).RelativeHorizontalPosition =
wdRelativeHorizontalPositionPage
ThisDocument.Shapes(1).RelativeVerticalPosition =
wdRelativeVerticalPositionPage
ThisDocument.Shapes(1).Left = wdShapeCenter
ThisDocument.Shapes(1).Top = wdShapeTop
End Sub
If you have any future questions or concerns on this, just let me know.
Have a nice day, Sir!
Best regards,
Ji Zhou
Microsoft Online Community Support