Word Track Changes

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Comparison MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-comparison -- dnx GroupDocs.Comparison.Mcp --yes
Folders, licensing and more →

By default, GroupDocs.Comparison includes Microsoft Word Track Changes (revisions) during comparison. Use CompareOptions.word_track_changes to toggle that behaviour.

Example 1: Include Word revisions during comparison

Detect and include tracked revisions (changes, comments, insertions, deletions) from the source document so that any previously tracked changes are preserved in the comparison output.

from groupdocs.comparison import Comparer
from groupdocs.comparison.options import CompareOptions

def include_word_track_changes():
    with Comparer("./source-with-revisions.docx") as comparer:
        comparer.add("./target.docx")
        options = CompareOptions()
        options.word_track_changes = True
        comparer.compare("./result.docx", options)

if __name__ == "__main__":
    include_word_track_changes()

source-with-revisions.docx is the source file used in this example. Click here to download it.

target.docx is the target file used in this example. Click here to download it.

Binary file (DOCX, 25 KB)

Download full output

Example 2: Ignore Word revisions during comparison

Compare only the final text and ignore previously tracked revisions so historical edits do not affect the diff.

from groupdocs.comparison import Comparer
from groupdocs.comparison.options import CompareOptions

def ignore_word_track_changes():
    with Comparer("./source-with-revisions.docx") as comparer:
        comparer.add("./target.docx")
        options = CompareOptions()
        options.word_track_changes = False
        comparer.compare("./result.docx", options)

if __name__ == "__main__":
    ignore_word_track_changes()

source-with-revisions.docx is the source file used in this example. Click here to download it.

target.docx is the target file used in this example. Click here to download it.

Binary file (DOCX, 30 KB)

Download full output

Use case: produce a clean diff focused on current content for executive review.

Note: the availability of particular options can depend on the document format and library version.

The result is as follows:

word_track_changes = True
word_track_changes = False