I'm currently using the OpenXml library in C# to compare two Word documents utilizing the WmlComparer.Compare method. The comparison works well in most cases, but I'm encountering an issue specifically related to legal style numbering.
When comparing two documents, if one contains legal style numbering and the other doesn't, the resulting compared document loses the legal numbering entirely, without even maintaining a strikethrough format.
I've already implemented the comparison using WmlComparer.Compare and set the necessary comparison settings. However, I'm struggling to retain the legal style numbering or apply strikethrough formatting to the mismatched numbering when generating the compared document. Here's a simplified version of the relevant part of my code:
Here's a simplified version of the relevant part of my code:
WmlComparerSettings settings = new WmlComparerSettings
{
AuthorForRevisions = author,
DetailThreshold = 0
};
var originalDoc = new WmlDocument(originalPath.ToString());
var revisedDoc = new WmlDocument(revisedPath.ToString());
WmlDocument comparedDoc = WmlComparer.Compare(originalDoc, revisedDoc, settings);