Wordize for .NET is an effective solution for programmatic Word file comparison and difference detection. The Comparer class enables C# developers to identify content differences between two Word documents with the required level of detail and save comparison results to an output document. Differences between documents are displayed as revisions of the first Word document with author and modification time information.
Key Features:Test the capabilities of programmatic Word document comparison in the interactive online demo presented on this page. Simply upload two Word files, run the comparison operation, and download results with identified differences. The provided C# code snippet is ready for use in your .NET project.
using Wordize.Comparing;
Comparer.Compare("Input1.docx", "Input2.docx",
"Output.docx", "Author Name", DateTime.Now);
using Wordize.Comparing;
Comparer.Compare("Input1.docx", "Input2.docx",
"Output.docx", "Author Name", DateTime.Now);
using Wordize.Comparing;
using Wordize.Saving;
var imageStreams = Comparer.CompareToImages("Input1.docx", "Input2.docx",
new ImageSaveOptions(SaveFormat.Docx), "Author Name", DateTime.Now);
foreach (var (stream, page) in imageStreams.Select((s, i) => (s, i)))
{
using var _ = stream;
stream.Position = 0;
using var file = File.Create($"Output_{page + 1}.docx");
stream.CopyTo(file);
}