Syncfusion Feedback

Trusted by the world’s leading companies

Syncfusion Trusted Companies

Overview

Unveil the capabilities of the Syncfusion .NET Word Library (DocIO), which helps users to identify differences between two versions of a Word document as tracked changes. Without relying on Microsoft Word or interop dependencies, our library facilitates precise detection of insertions, deletions, and formatting changes, ensuring a seamless review process.

Compare Word documents using C#

This example code shows how to easily compare Word documents using Syncfusion .NET Word library with just a few lines of C# code.

  1. using Syncfusion.DocIO;
  2. using Syncfusion.DocIO.DLS;
  3. //Load the original Word document
  4. using FileStream originalDocumentStream = new FileStream("OriginalDocument.docx", FileMode.Open, FileAccess.Read);
  5. using WordDocument originalDocument = new WordDocument(originalDocumentStream, FormatType.Docx);
  6. //Load the revised Word document
  7. using FileStream revisedDocumentStream = new FileStream("RevisedDocument.docx", FileMode.Open, FileAccess.Read);
  8. using WordDocument revisedDocument = new WordDocument(revisedDocumentStream, FormatType.Docx);
  9. //Compare the original and revised Word documents originalDocument.Compare(revisedDocument);
  10. //Save the Word document
  11. using FileStream outputDocumentStream = new FileStream("Result.docx", FileMode.Create, FileAccess.ReadWrite);
  12. originalDocument.Save(outputDocumentStream, FormatType.Docx);

Key features of Compare Word documents

Set author and date

Specify the author’s name and date for revisions, to simplify the identification of changes while comparing Word documents.

Ignore format changes

Focus exclusively on content differences by ignoring formatting changes during the comparison process.

Syncfusion .NET Word Library Resources

Explore these resources for comprehensive guides, knowledge base articles, insightful blogs, and ebooks.

Frequently Asked Questions

The .NET Word Library (DocIO) performs word-by-word comparisons, detecting discrepancies at the letter level within words. If any letter in a word is mismatched, the entire word is highlighted as a difference.

Yes, you can customize comparisons to focus only on content differences, ignoring formatting changes.

Yes, you can clone the original document for comparison. This allows you to preserve the original document’s content without any alterations while saving the comparison results separately.

The .NET Word Library (DocIO) compares various elements such as tables, formatting (including font styles, colors, and sizes), and graphical elements such as images, charts, and shapes.

The Word Library accepts the tracked changes in the documents and then proceeds with the comparison.

You can access it through the Syncfusion.DocIO.Net.Core NuGet package. Detailed code samples and tutorial videos are available in the documentation, facilitating seamless integration.

Our Customers Love Us

Having an excellent set of tools and a great support team, Syncfusion® reduces customers’ development time.
Here are some of their experiences.

Rated by users across the globe

Want to create, View, and edit Word documents in C# or VB.NET?

Start a free 30-day evaluation today!
DOWNLOAD FREE TRIAL

No credit card required.

Mobile Free Evaluation Section

Awards

Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion® is proud to hold the following industry awards.

Scroll up icon
Chat with us