Table Format Change of the old document is not getting preserved after the document comparison is made between two documents

I am currently using Aspose Word Compare to check the differences between two documents and save any changes in a specific location. If there are any changes in the documents, especially format change made in the tables, and I decide not to keep those changes in the saved document, then the original table formatting from the first document will not be applied, and this alter the overall structure of the document also.

1 Like

@geekyboy Could you please attach your input, output and expected output documents here for testing? We will check the issue and provide you more information.

Panel Letter_Revised.docx (22.7 KB)
Panel Letter_original.docx (22.8 KB)
Panel Letter_difference.docx (18.1 KB)
Thank you for your response,
Here i have attached three documents original, revised and difference docx. Some changes are made in the original docx and saved as revised docx. And after making use of aspose word compare i am getting the difference docx. But i want to reject all the changes in difference docx specially the table format change. But as i do, the structure of the entire doc changes.

@geekyboy You can use CompareOptions to configure comparison. For example you can ignore tables using code like this:

Document original = new Document(@"C:\Temp\Panel Letter_original.docx");
Document revised = new Document(@"C:\Temp\Panel Letter_Revised.docx");

Aspose.Words.Comparing.CompareOptions opt = new Aspose.Words.Comparing.CompareOptions();
opt.IgnoreTables = true;

original.Compare(revised, "test", DateTime.Now, opt);

original.Save(@"C:\Temp\out.docx");

If you need to ignore formatting changes, you can specify CompareOptions.IgnoreFormatting.