w:pPrChange (Previous Paragraph Properties)
Records the previous paragraph properties before a tracked change, enabling revision tracking at the paragraph formatting level.
Description
w:pPrChange is a revision tracking element that stores the previous (pre-change) paragraph properties when paragraph formatting has been changed and revision tracking is enabled. It is the paragraph-formatting equivalent of w:ins/w:del for content changes.
It is defined in ECMA-376 Part 1 §17.13.5.29.
The child w:pPr element inside w:pPrChange represents the paragraph properties before the change was applied. The current properties are stored in the parent w:pPr element in the normal way.
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 made the change. |
w:date |
xsd:dateTime |
ISO 8601 date-time string | Date and time of the change. |
Examples
<!--
The paragraph is now centered (current pPr: jc=center).
It was previously left-aligned (old pPr inside pPrChange: jc=left).
-->
<w:p>
<w:pPr>
<w:jc w:val="center"/>
<w:pPrChange w:id="1" w:author="Alice" w:date="2024-01-15T10:30:00Z">
<w:pPr>
<w:jc w:val="left"/>
</w:pPr>
</w:pPrChange>
</w:pPr>
<w:r><w:t>This paragraph was recently reformatted.</w:t></w:r>
</w:p>
using DocumentFormat.OpenXml.Wordprocessing;
var para = new Paragraph(
new ParagraphProperties(
new Justification { Val = JustificationValues.Center },
new ParagraphPropertiesChange
{
Id = 1,
Author = "Alice",
Date = "2024-01-15T10:30:00Z",
}.Append(
new ParagraphProperties(
new Justification { Val = JustificationValues.Left }
)
)
),
new Run(new Text("This paragraph was recently reformatted."))
);
Notes
w:pPrChangeis placed as the last child ofw:pPr.- The child
w:pPrinsidew:pPrChangemust not itself contain aw:pPrChange(no nesting). - When a reviewer accepts the change, the
w:pPrChangeelement is removed and the current (outer) properties remain. - When rejected, the properties inside
w:pPrChangereplace the current properties andw:pPrChangeis removed.