ShapeRange.Align method (PowerPoint)

Aligns the shapes in the specified range of shapes.

Syntax

expression. Align( _AlignCmd_, _RelativeTo_ )

expression A variable that represents a ShapeRange object.

Parameters

Name Required/Optional Data type Description
AlignCmd Required MsoAlignCmd Specifies the way the shapes in the specified shape range are to be aligned.
RelativeTo Required MsoTriState Determines whether shapes are aligned relative to the edge of the slide.

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, msoFalse

See also

ShapeRange Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.