w:rPr (Run Properties)
Container for all character-level formatting properties applied to a run or paragraph mark.
Description
w:rPr is the run properties container, grouping all character-level formatting for a w:r. It is defined in ECMA-376 Part 1 §17.3.2.28.
w:rPr can also appear inside w:pPr to set the properties of the paragraph mark (the non-printing character that ends a paragraph and carries its formatting). Additionally, w:rPr appears inside w:style to define character formatting for that style.
Common children include w:rStyle, w:rFonts, w:b, w:i, w:u, w:strike, w:color, w:sz, w:highlight, w:vertAlign, w:lang, w:vanish, w:kern, and many more.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
| (none) | — | — | All run properties are expressed via child elements. |
Examples
<w:r>
<w:rPr>
<w:b/>
<w:color w:val="FF0000"/>
<w:sz w:val="28"/>
</w:rPr>
<w:t>Styled text</w:t>
</w:r>
new Run(
new RunProperties(
new Bold(),
new Color { Val = "FF0000" },
new FontSize { Val = "28" }),
new Text("Styled text"));