Home/ Reference/ Enumerations

shape.Type

1 rectangle / 2 ellipse / 3 curve / 4 polygon / 5 bitmap / 6 text / 7 group / 8 selection.

Signature

shape.Type

Notes

1 rectangle / 2 ellipse / 3 curve / 4 polygon / 5 bitmap / 6 text / 7 group / 8 selection.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
TYPE_NAME = {
    1: "Rectangle", 2: "Ellipse", 3: "Curve", 4: "Polygon",
    5: "Bitmap", 6: "Text", 7: "Group", 8: "Selection"
}

shape = app.ActiveSelectionRange(1)
print("Type: ", TYPE_NAME.get(shape.Type, "Other"))

if shape.Type == 6:
    print("is text, so .Text is safe to read")

About this section: Enumerations

Enumerations — VBA constants and their integer values.

Other entries in this section