w:tcPrChange (Revision — Table Cell Properties Change)
Records a tracked change to a table cell's properties, storing the previous cell property state before the revision.
Description
w:tcPrChange is a revision tracking element that captures the previous state of w:tcPr when table cell properties are changed with change tracking enabled. It stores the original cell properties so the change can be accepted or rejected.
It is defined in ECMA-376 Part 1 §17.13.7.6.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:id |
xsd:integer |
Positive integer | Unique revision ID within the document. |
w:author |
xsd:string |
Any string | Author name. |
w:date |
xsd:dateTime |
ISO 8601 date-time | Timestamp of the change. |
Child Elements
| Element | Description |
|---|---|
w:tcPr |
The original cell properties before the tracked change. |
Examples
<w:tcPr>
<w:tcW w:w="3000" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="4472C4" w:themeFill="accent1"/>
<w:tcPrChange w:id="3" w:author="Bob" w:date="2024-02-20T14:00:00Z">
<w:tcPr>
<w:tcW w:w="3000" w:type="dxa"/>
</w:tcPr>
</w:tcPrChange>
</w:tcPr>
using DocumentFormat.OpenXml.Wordprocessing;
var tcPrChange = new TableCellPropertiesChange
{
Id = 3,
Author = "Bob",
Date = "2024-02-20T14:00:00Z"
};
tcPrChange.Append(new TableCellProperties(
new TableCellWidth { Width = "3000", Type = TableWidthUnitValues.Dxa }
));
Notes
w:tcPrChangemust be the last child element ofw:tcPr.- The inner
w:tcPrtypically does not need to include a nestedw:tcPrChange. - Pair with
w:tblPrChangeandw:trPrChangewhen multiple levels of table structure are revised simultaneously.