GroupDocs.Comparison provides the WordCompareOptions class for configuring comparison of Word documents (.doc, .docx, .rtf, and other word-processing formats). It extends CompareOptions and adds Word-specific properties — most notably the DisplayMode property, which controls how detected changes are written into the result document.
Display modes
The setDisplayMode() method accepts one of two values from the WordCompareOptions.ComparisonDisplayMode enumeration:
REVISIONS (default) — changes are emitted as native Word revision (track-changes) markup. The result opens in Microsoft Word with the Review → Accept / Reject controls ready.
HIGHLIGHT — inserted, deleted, and modified text is rendered with inline colour highlights directly in the document body. No track-changes metadata is added.
Note
A plain CompareOptions object keeps producing highlighted output, as before. Track-changes output is the default only when you pass a WordCompareOptions object.
In this mode the changes live in the result document as Word revisions, so Comparer.getChanges() is not available after the comparison. Use HIGHLIGHT mode when you need the list of changes from the API.
setLeaveGaps() — leave empty lines in place of inserted or deleted content to preserve layout. See Show gap lines.
All CompareOptions base properties — InsertedItemStyle, DeletedItemStyle, ChangedItemStyle, SensitivityOfComparison, GenerateSummaryPage, and others — are also available on WordCompareOptions.
Note
The Word-specific setters on CompareOptions (setWordTrackChanges(), setCompareBookmarks(), setRevisionAuthorName(), and others) are deprecated. They keep working for backward compatibility, but new code should use WordCompareOptions. On a WordCompareOptions object, setWordTrackChanges(true) is equivalent to setDisplayMode(REVISIONS) and setWordTrackChanges(false) to setDisplayMode(HIGHLIGHT).