Home/ Reference/ TextRange

rng.Case

Case conversion (all caps, small caps and so on).

Signature

rng.Case

Notes

Case conversion (all caps, small caps and so on).

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

try:
    ca.Case = 1                    # case conversion (1 = all caps; see cdrTextCase)
    print("Case converted")
except Exception as e:
    print("Case is unsupported in this version: ", e)

About this section: TextRange

TextRange — character ranges inside a text object.

Other entries in this section