With change tracking on, an edit does not replace text. Both versions stay in the file,
and marks record who did what and when, until the changes are accepted or rejected. So a
document can hold text its reader never sees on screen. Turning tracking on is the
w:trackRevisions setting in word/settings.xml.
Inserted and deleted text
<w:p>
<w:r><w:t xml:space="preserve">The </w:t></w:r>
<w:ins w:id="1" w:author="Ada Example" w:date="2024-05-17T13:45:00Z">
<w:r><w:t>new</w:t></w:r>
</w:ins>
<w:del w:id="2" w:author="Ada Example" w:date="2024-05-17T13:45:00Z">
<w:r><w:delText>old</w:delText></w:r>
</w:del>
<w:r><w:t xml:space="preserve"> text</w:t></w:r>
</w:p>
| Attribute | Meaning |
|---|---|
w:id | A number, unique among the document’s annotations. |
w:author | Who made the change. |
w:date | When, as an ISO 8601 date and time. It may be left out. |
Moved text
A moved passage appears in both places. w:moveFrom marks the old place and
w:moveTo the new. The ends are marked by
w:moveFromRangeStart and w:moveFromRangeEnd, with the same pair
for moveTo, sharing a w:name.
Other tracked changes
| Where | Element | Records |
|---|---|---|
w:pPr/w:rPr | w:ins, w:del | The paragraph mark itself was inserted or deleted, so two paragraphs would join on accepting. |
w:rPr | w:rPrChange | The run’s previous formatting. |
w:pPr | w:pPrChange | The paragraph’s previous formatting. |
w:sectPr | w:sectPrChange | The section’s previous properties. |
w:tblPr, w:trPr, w:tcPr, w:tblGrid | w:tblPrChange, w:trPrChange, w:tcPrChange, w:tblGridChange | Previous table formatting. |
w:trPr | w:ins, w:del | A whole row inserted or deleted. |
w:tcPr | w:cellIns, w:cellDel, w:cellMerge | A cell inserted, deleted or merged. |
A formatting change holds the old properties. The new ones are the element’s siblings: the element records only what they replaced.
Reading tracked changes
To get the text as if all changes were accepted, read the content of w:ins
and w:moveTo, and skip w:del and w:moveFrom. To get it
as if they were rejected, do the reverse. The explorer shows inserted text as plain text,
deleted text struck through, and lists every change with its author and date.