Work with Word Track Changes

By default, GroupDocs.Comparison can include or ignore Word Track Changes (revisions) during comparison. Use CompareOptions to control this behavior.

Example: Include Word revisions during comparison

Enable the comparison engine to detect and include tracked revisions (changes, comments, insertions, deletions) from Word documents when generating the comparison result. This ensures that any previously tracked changes are not lost during the comparison process.

import groupdocs.comparison as gc

with gc.Comparer("source-with-revisions.docx") as comparer:
    comparer.add("target.docx")

    options = gc.CompareOptions()
    options.word_track_changes = True  # include tracked revisions

    comparer.compare("result.docx", options)

🔹Enable the comparison engine to detect and include tracked revisions (changes, comments, insertions, deletions) from Word documents when generating the comparison result. This ensures that any previously tracked changes are not lost during the comparison process.

Example: Ignore Word revisions during comparison

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

import groupdocs.comparison as gc

with gc.Comparer("source-with-revisions.docx") as comparer:
    comparer.add("target.docx")

    options = gc.CompareOptions()
    options.word_track_changes = False  # ignore tracked revisions

    comparer.compare("result.docx", options)

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

Note: Availability of particular options may depend on the document format and library version.

The result is as follows:

WordTrackChanges true
WordTrackChanges false
Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.