Compare bookmarks in Word documents


GroupDocs.Comparison allows to compare bookmarks in WORD documents.

The following are the steps to compare bookmarks of documents:

Example code block to demonstrate how to compare bookmarks


try (Comparer comparer = new Comparer(sourcePath)) {
    comparer.add(targetPath);

    CompareOptions compareOptions = new CompareOptions();
    compareOptions.setCompareBookmarks(true);
    final Path resultPath = comparer.compare(RESULT_PATH, compareOptions);
}

The result after comparing document with enabled CompareBookmarks option


The result of compared bookmarks is presented as inserted comments with description in document. See example below on image:

More resources


GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples:

Free Online App

Along with full-featured Java library we provide simple, but powerful free Apps. You are welcome to compare your DOC or DOCX, XLS or XLSX, PPT or PPTX, PDF, EML, EMLX, MSGand other documents with free to use online GroupDocs Comparison App.