Compare bookmarks in Word documents
Leave feedback
On this page
GroupDocs.Comparison allows you to compare bookmarks in the Word documents.
To compare bookmarks in the Word documents, follow these steps:
- Instantiate the Comparer object. Specify the source file path or stream.
- Call the Add method. Specify the target file path or stream.
- Instantiate the CompareOptions object. Set the CompareBookmarks property to
true
. - Call the Comparer method. Specify the CompareOptions object from the previous step.
The following code snippet shows how to demonstrate how to compare bookmarks:
using GroupDocs.Comparison;
using GroupDocs.Comparison.Options;
// ...
using (Comparer comparer = new Comparer("source.docx"))
{
comparer.Add("target.docx");
comparer.Compare("result.docx", new CompareOptions {
CompareBookmarks = true
});
}
The result of compared bookmarks is as follows:
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.