Home/ Reference/ Shape Appearance

shape.Text

The text object. See the Text section. Accessing it on a non-text shape raises, so check shape.Type == 6 first.

Signature

shape.Text

Notes

The text object. See the Text section. Accessing it on a non-text shape raises, so check shape.Type == 6 first.

Python example (runnable)

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

# check the type first; .Text on a non-text shape raises
if shape.Type == 6:
    t = shape.Text
    print("Content: ", t.Contents)
    print("is artistic text: ", t.IsArtisticText)
else:
    print("Not a text shape, type: ", shape.Type)

About this section: Shape Appearance

Shape Appearance — outline, fill and transparency shortcuts.

Other entries in this section