Show results of comparison as a Word Track Changes

On this page


GroupDocs.Comparison allows you to customize the display of revisions in the output document.

Revision is a collection of changes received when comparing documents using built-in Word tools.

By default, the Word Track Changes option is false. Follow these steps to turn on the Word Track Changes:

  1. Instantiate the Comparer object. Specify the source file path or stream.
  2. Call the add() method. Specify the target file path or stream.
  3. Instantiate the CompareOptions object. Set the WordTrackChanges property to true;
  4. Call the compare() method. Specify the CompareOptions object from the previous step.

The following code snippet shows how to disable the display of revisions:

try (Comparer comparer = new Comparer(sourcePath)) {
    comparer.add(targetPath);
    CompareOptions options = new CompareOptions();
    options.setWordTrackChanges(true);
    comparer.compare(resultPath, options);
}

The result is as follows:

WordTrackChanges true
WordTrackChanges false

On this page