rng.Outline
Text outline. This is the core of the yellow-text-with-black-edge look.
Signature
rng.Outline
Notes
Text outline. This is the core of the yellow-text-with-black-edge look.
Python example (runnable)
Requires
pywin32. The example assumes app / doc / page / layer are already connected.
See Connection & InitPython
shape = app.ActiveSelectionRange(1)
ca = shape.Text.Story.Characters.All
# text outline: yellow fill with black edge, common in print
o = ca.Outline
o.Width = 1 / 25.4 # 1mm outline
o.Color.RGBAssign(0, 0, 0) # black
o.LineJoin = 1 # miter join
o.Justification = 2 # outline sits outside so it does not eat the glyph
o.LineCaps = 1 # round cap
print("Text outline added")
About this section: TextRange
TextRange — character ranges inside a text object.
- This section has 7 entries; this is one of them.
- See the full section index: TextRange
Other entries in this section
- rng.FontFont name, read/write. Always read it back after writing (see the warn
- rng.SizeFont size in points, not doc.Unit.
- rng.Bold / .Italic / .UnderlineBold, italic, underline. Booleans.
- rng.CharSpacingCharacter spacing percentage. More precise than setting it on the Stor
- rng.FillText fill, same as a shape's Fill.
- rng.CaseCase conversion (all caps, small caps and so on).