Home/ Reference/ Geometry & Transform

shape.Name

Object name, read/write. Name the important elements ("title bar", "image frame") and later scripts can find them exactly.

Signature

shape.Name

Notes

Object name, read/write. Name the important elements ("title bar", "image frame") and later scripts can find them exactly.

Python example (runnable)

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

shape.Name = "Main headline"                    # name the shape, find it by name later
print("Name: ", shape.Name)

page = doc.ActivePage
for i in range(1, page.Shapes.Count + 1):
    s = page.Shapes.Item(i)
    if s.Name == "Main headline":
        print("Found, type: ", s.Type)

About this section: Geometry & Transform

Geometry & Transform — position, size and rotation of shapes.

Other entries in this section