Home/ Reference/ Text

shape.Text.Story.Characters.All

The whole-character range, and the only reliable way to set font and size in bulk. Text.FontProperties swallows size changes without complaint — don't use it.

Signature

shape.Text.Story.Characters.All

Notes

The whole-character range, and the only reliable way to set font and size in bulk. Text.FontProperties swallows size changes without complaint — don't use it.

Python example (runnable)

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

# All = the whole character range; the only reliable way to set font and size
ca = shape.Text.Story.Characters.All

ca.Font = "Source Han Sans Bold"
ca.Size = 24                        # unit: points
print("Font and size changed")

About this section: Text

Text — artistic and paragraph text.

Other entries in this section