w:tblPrChange (Revision — Table Properties Change)
Records a tracked change to a table's properties, storing the previous table property state before the revision.
Description
w:tblPrChange is a revision tracking element that captures the previous state of w:tblPr when table-level properties are changed with change tracking enabled. The current w:tblPr represents the accepted revision; w:tblPrChange holds the original properties that would be restored if the change were rejected.
It is defined in ECMA-376 Part 1 §17.13.7.4.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:id |
xsd:integer |
Positive integer | Unique revision ID within the document. |
w:author |
xsd:string |
Any string | Name of the author who made the change. |
w:date |
xsd:dateTime |
ISO 8601 date-time | Timestamp of the change. |
Child Elements
| Element | Description |
|---|---|
w:tblPr |
The original table properties before the tracked change. |
Examples
<!-- tblPr after change: auto-fit width; tblPrChange: previous fixed width -->
<w:tblPr>
<w:tblW w:w="0" w:type="auto"/>
<w:tblPrChange w:id="1" w:author="Jane Smith" w:date="2024-03-15T10:00:00Z">
<w:tblPr>
<w:tblW w:w="9000" w:type="dxa"/>
</w:tblPr>
</w:tblPrChange>
</w:tblPr>
using DocumentFormat.OpenXml.Wordprocessing;
var tblPrChange = new TablePropertiesChange
{
Id = 1,
Author = "Jane Smith",
Date = "2024-03-15T10:00:00Z"
};
tblPrChange.Append(new TableProperties(
new TableWidth { Width = "9000", Type = TableWidthUnitValues.Dxa }
));
Notes
w:tblPrChangemust be the last child element ofw:tblPr.- The
w:idmust be unique across all revision marks in the document. - Accepting the change discards
w:tblPrChange; rejecting it swaps the original properties back.