Home/ Reference/ TextRange

rng.Bold / .Italic / .Underline

Bold, italic, underline. Booleans.

Signature

rng.Bold / .Italic / .Underline

Notes

Bold, italic, underline. Booleans.

Python example (runnable)

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

ca.Bold      = True      # bold
ca.Italic    = False     # italic
ca.Underline = False     # underline
print("Set to bold")

About this section: TextRange

TextRange — character ranges inside a text object.

Other entries in this section