w:numStyleLink (Numbering Style Link)
Links an abstract numbering definition to a named list style, allowing the list to be applied via style rather than direct numPr references.
Parent elements
Description
w:numStyleLink declares that an w:abstractNum entry is the underlying numbering definition for a named list style. The style whose w:styleId matches the value of w:numStyleLink controls which formatting is applied when the list is used via that style.
It is defined in ECMA-376 Part 1 §17.9.21.
The companion element w:styleLink (also in w:abstractNum) performs the inverse mapping: it declares that the abstract numbering definition exposes itself as a list style.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:val |
xsd:string |
A style ID matching a w:style w:styleId in styles.xml |
Identifies the list style that drives this abstract numbering definition. |
Examples
<!-- This abstract numbering definition is driven by the "ListNumber" style -->
<w:abstractNum w:abstractNumId="3">
<w:numStyleLink w:val="ListNumber"/>
</w:abstractNum>
using DocumentFormat.OpenXml.Wordprocessing;
var abstractNum = new AbstractNum(
new NumberingStyleLink { Val = "ListNumber" }
)
{ AbstractNumberId = 3 };
Notes
- When
w:numStyleLinkis present, thew:abstractNumentry usually has now:lvlchildren of its own — the formatting comes entirely from the referenced style. - This pattern is used by Word’s built-in “List Number” and “List Bullet” styles.
- The style referenced by
w:valshould havew:type w:val="numbering".