w:outline (Outline Text Effect)
Renders text as outlined (hollow) characters — the character interior is not filled, only the stroke is drawn.
Parent elements
Description
w:outline is a toggle property that applies an outline rendering effect to text in a run. Characters are rendered as hollow shapes — only the outer stroke of each glyph is drawn, without a filled interior.
It is defined in ECMA-376 Part 1 §17.3.2.23.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:val |
ST_OnOff |
true, false, 1, 0, on, off |
Enables the outline text effect. Omit to inherit. |
Examples
<w:r>
<w:rPr>
<w:outline/>
</w:rPr>
<w:t>Outlined text</w:t>
</w:r>
using DocumentFormat.OpenXml.Wordprocessing;
var run = new Run(
new RunProperties(new Outline()),
new Text("Outlined text")
);
Notes
- Legacy effect inherited from older Word formats. For richer outline effects in modern documents, use DrawingML text body properties.
- May be combined with
w:shadowfor a classic outlined-with-shadow look.