Align Shapes

Introduction

Aligning shapes in PowerPoint presentations is an essential feature that allows you to create professionally polished slides and documents. This feature ensures precise arrangement, alignment, and distribution of space between shapes, making the presentation look more organized and easily comprehensible. Use the following method to align shapes on special slides (Master, Layout, or Notes) and enhance the visual appeal of your presentations.

AlignSpecialSlideShapes

API Information

API Type Description Resource
/slides/{name}/slides/{slideIndex}/{slideType}/shapes/align/{alignmentType} POST Aligns shapes to the edge of the slide or aligns them relative to each other on a special slide. AlignSpecialSlideShapes

Request Parameters

Name Type Location Required Description
name string path true The name of a presentation file saved in a storage.
slideIndex integer path true The 1-based index of a presentation slide.
slideType MasterSlide or LayoutSlide or NotesSlide path true The type of a special slide.
alignmentType ShapesAlignmentType path true The type of alignment that will be applied to the shapes.
alignToSlide boolean query false If true, the shapes will be aligned to the slide edges; otherwise, they will be aligned to each other. The default is false.
shapes string query false The indices of the shapes to be aligned.
password string header false The password to open the presentation.
folder string query false The folder where the presentation file is located.
storage string query false The storage where the folder is located.
subShape string query false The sub-shape path (e.g. “3”, “3/shapes/2”).

In case of Amazon S3 storage folder path starts with Amazon S3 bucket name.

ShapesAlignmentType Values
Name Value Description
AlignLeft 0 Align shapes to the left.
AlignRight 1 Align shapes to the right.
AlignCenter 2 Align shapes to the center.
AlignTop 3 Align shapes to the top.
AlignMiddle 4 Align shapes to the middle.
AlignBottom 5 Align shapes to the bottom.
DistributeHorizontally 6 Distribute shapes horizontally.
DistributeVertically 7 Distribute shapes vertically.

Examples

The document MyPresentation.pptx contains “Date and time”, “Footer”, and “Slide number” placeholders on the Master slide of the first presentation slide. Align the “Date and time” and “Slide number” to the bottom of the Master slide.

Screenshot of the Master slide.

cURL Solution

SDK Solutions

The result:

Screenshot of the Master slide.

SDKs

Check Available SDKs to learn how to add an SDK to your project.