Home/ Reference/ Align / Distribute

shape.AlignToPageCenter(AlignType)

Aligns to the page center, strictly, with each axis specified separately. Same values: 3 horizontal, 12 vertical.

Signature

shape.AlignToPageCenter(AlignType)

Notes

Aligns to the page center, strictly, with each axis specified separately. Same values: 3 horizontal, 12 vertical.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
shapes = app.ActiveSelectionRange

for i in range(1, shapes.Count + 1):
    shapes.Item(i).AlignToPageCenter(3)             # centre horizontally
    shapes.Item(i).AlignToPageCenter(12)            # centre vertically

print("All centred on the page")

About this section: Align / Distribute

Align / Distribute — align, distribute and transform.

Other entries in this section