We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to skip parts while comparing two .docx documents

Hi Aspose Team,

I’m comparing 2 .docx documents. These documents are big (with images, tables). Some parts of these documents frequently change, some - less. Is it possible to ask Aspose not to compare some parts of the document and only use the new document? Maybe I can add special “placeholders” before and after the text to let Aspose skip and replace that part?

I appreciate any help you can provide.


@boh.den You can instruct Aspose.Words to ignore some changes in the document using CompareOptions. For example the following code will the differences in data contained in tables.

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

docOriginal.Compare(docEdited, "John Doe", DateTime.Now, compareOptions);

If you need to ignore some sections in the document, I can suggest you only split your documents into parts, compare the required parts and then concatenate documents again.