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.
This example code shows how to easily compare Word documents using Syncfusion .NET Word library with just a few lines of C# code.
- using Syncfusion.DocIO;
- using Syncfusion.DocIO.DLS;
- //Load the original Word document
- using FileStream originalDocumentStream = new FileStream("OriginalDocument.docx", FileMode.Open, FileAccess.Read);
- using WordDocument originalDocument = new WordDocument(originalDocumentStream, FormatType.Docx);
- //Load the revised Word document
- using FileStream revisedDocumentStream = new FileStream("RevisedDocument.docx", FileMode.Open, FileAccess.Read);
- using WordDocument revisedDocument = new WordDocument(revisedDocumentStream, FormatType.Docx);
- //Compare the original and revised Word documents originalDocument.Compare(revisedDocument);
- //Save the Word document
- using FileStream outputDocumentStream = new FileStream("Result.docx", FileMode.Create, FileAccess.ReadWrite);
- originalDocument.Save(outputDocumentStream, FormatType.Docx);
Specify the author’s name and date for revisions, to simplify the identification of changes while comparing Word documents.
Focus exclusively on content differences by ignoring formatting changes during the comparison process.
Explore these resources for comprehensive guides, knowledge base articles, insightful blogs, and ebooks.
Product Updates
Technical Support
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.
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.