Home/ Reference/ Find & Traverse

coll.FindShapes("", 6, True)

Every text object. The most-used call of the lot, and it drills through groups and containers.

Signature

coll.FindShapes("", 6, True)

Notes

Every text object. The most-used call of the lot, and it drills through groups and containers.

Python example (runnable)

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

texts = page.FindShapes("", 6, True)          # 6 = text, recursive
print("Text shapes: ", texts.Count)

for i in range(1, texts.Count + 1):
    s = texts.Item(i)                          # s : the i-th text shape
    print(i, repr(s.Text.Contents))

About this section: Find & Traverse

Find & Traverse — walking the shape tree.

Other entries in this section