w:numPrChange (Previous Numbering Properties)
Records the previous numbering properties before a tracked change, enabling revision tracking at the list level.
Description
w:numPrChange stores the previous list numbering assignment (w:numId and w:ilvl) before a tracked formatting change was applied. It is the numbering counterpart of w:pPrChange for paragraph-level formatting revision tracking.
It is defined in ECMA-376 Part 1 §17.13.5.33.
The child w:numPr inside w:numPrChange holds the numbering properties before the change. The current assignment is in the parent w:numPr.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:id |
xsd:integer |
Positive integer, unique in the document | Revision identifier. |
w:author |
xsd:string |
Any string | Name of the author who changed the numbering. |
w:date |
xsd:dateTime |
ISO 8601 date-time string | Date and time of the change. |
Examples
<!--
Paragraph now uses list numId=2 (current).
It previously used numId=1 (stored inside numPrChange).
-->
<w:pPr>
<w:numPr>
<w:ilvl w:val="0"/>
<w:numId w:val="2"/>
<w:numPrChange w:id="3" w:author="Carol" w:date="2024-03-01T11:00:00Z">
<w:numPr>
<w:ilvl w:val="0"/>
<w:numId w:val="1"/>
</w:numPr>
</w:numPrChange>
</w:numPr>
</w:pPr>
using DocumentFormat.OpenXml.Wordprocessing;
var numPr = new NumberingProperties(
new NumberingLevelReference { Val = 0 },
new NumberingId { Val = 2 },
new NumberingChange
{
Id = 3,
Author = "Carol",
Date = "2024-03-01T11:00:00Z",
}.Append(
new NumberingProperties(
new NumberingLevelReference { Val = 0 },
new NumberingId { Val = 1 }
)
)
);
Notes
w:numPrChangeis the last child element ofw:numPr.- Accepting the change removes
w:numPrChange; rejecting swaps the inner properties to the outer position.