Compare more than two Word documents

Hi, we have a requirement to track changes history made in different versions. In the following code, due to v1.AcceptAllRevisions(), I can only see the changes made in version 3. Please help to find a way that we can see all the revisions made in version 2 and version 3. Thanks in advance.

        Document v1 = new Document(@"C:\Source\ConsoleApp1\docs\v1.docx");
        Document v2 = new Document(@"C:\Source\ConsoleApp1\docs\v2.docx");
        Document v3 = new Document(@"C:\Source\ConsoleApp1\docs\v3.docx");

        v1.Compare(v2, "user2", DateTime.Now);
        v1.AcceptAllRevisions();
        v1.Compare(v3, "user3", DateTime.Now);

        v1.Save(@"C:\Source\ConsoleApp1\docs\result.docx");

@richardZhang,

To ensure a timely and accurate response, please ZIP and attach the following resources here for testing:

  • Your simplified input documents
  • Aspose.Words 18.12 generated output document showing the undesired behavior
  • Your expected document showing the correct output. You can create expected document by using MS Word. Please list complete Steps that you used in MS Word to create expected document.

As soon as you get these pieces of information ready, we will start further investigation into your issue and provide you more information. Thanks for your cooperation.

ConsoleApp1.zip (1.7 MB)

Hi, I uploaded an simple test application which try to compare 3 documents (actually 3 versions from one document). We would like to see which change is from version 2 author and which change is from version 3 author. Check ConsoleApp1\docs\Expected.jpg for detail.

Waiting for your response. Thanks.

@richardZhang,

But, when we use MS Word to compare v1.docx (original document) with v2.docx (revised document) and then compare resultant document (v1v2.docx) with v3.docx (revised document), it throws the following warning message:
https://imgur.com/a/8KesOyB

And when we click Yes, it loses the previous track changes history and produces final.docx. Please see these documents. msw-2019-documents.zip (18.6 KB)

Are you able to meet this requirement by using MS Word. If yes, then please list complete steps that we can follow on our end to reproduce the expected output by using MS Word.

Also, please ZIP and attach your expected Word document showing the desired output.

Hover your mouse over the changes and you will be able see who made those changes. This is what we expect as the compare result of three versions.

Expected.zip (10.6 KB)

@richardZhang,

We are checking this scenario on our end and will get back to you soon.

@richardZhang,

Your expected document is different.

You previously attached three input documents i.e. v1.docx, v2.docx and v3.docx. What we are asking is that can you please use these three documents and produce expected document by using MS Word? If this is possible in MS Word, then please list complete steps that we can follow on our end to reproduce the same expected output by using MS Word.