Home/ Reference/ Page

page.Shapes

All top-level shapes on the page. To reach the ones inside groups and containers you have to recurse yourself (see Find & Traverse).

Signature

page.Shapes

Notes

All top-level shapes on the page. To reach the ones inside groups and containers you have to recurse yourself (see Find & Traverse).

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
page = doc.ActivePage
print("Top-level shapes: ", page.Shapes.Count)

for i in range(1, page.Shapes.Count + 1):
    s = page.Shapes.Item(i)              # s : the i-th shape
    print(i, "type", s.Type)

About this section: Page

Page — pages and page setup.

Other entries in this section