Align Method

Microsoft Word Visual Basic

expression.Align(Align, RelativeTo)

expression    Required. An expression that returns one of the objects in the Applies To list.

Align   Required MsoAlignCmd. Specifies the way the shapes in the specified shape range are to be aligned.

MsoAlignCmd can be one of these MsoAlignCmd constants.
msoAlignCenters
msoAlignMiddles
msoAlignTops
msoAlignBottoms
msoAlignLefts
msoAlignRights

RelativeTo   Required Long. True to align shapes relative to the edge of the document. False to align shapes relative to one another.

Example

This example aligns the left edges of all the shapes in the selection of shapes in the active document with the left edge of the leftmost shape in the range.

Set myShapeRange = Selection.ShapeRange
myShapeRange.Align msoAlignLefts, False