Align Method
Applies To
ShapeRange collection object.
Description
Aligns the shapes in the specified range of shapes.
Syntax
expression.Align(AlignCmd, RelativeTo)
expression Required. An expression that returns a ShapeRange object.
AlignCmd Required Long. Specifies the way the shapes in the specified shape range are to be aligned. Can be one of the following MsoAlignCmd constants: msoAlignBottoms, msoAlignCenters, msoAlignLefts, msoAlignMiddles, msoAlignRights, or msoAlignTops.
RelativeTo Required Long. True to align shapes relative to the edge of the document. False to align shapes relative to one another.
See Also
Distribute method.
Example
This example aligns the left edges of all the shapes in the specified range in myDocument with the left edge of the leftmost shape in the range.
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.Range.Align msoAlignLefts, False