Wrong document compare

good day,
I also noticed that for one document, if I accept the revision marks in aspos, then after comparing the same document, changes occur between the documents. (compering primeAccept with prime)
If I accept revision marks in MS Word, there are no changes in the document.

docPrime = new Document(".../prime.docx");
if (docPrime.Revisions.Count > 0)
{
    docPrime.Revisions.AcceptAll();
}

docPrime.Save("C://temp/test/primeAccept.docx");

prime1TSD130_P01.docx.docx (30.4 KB)

@benestom Unfortunately, it is not quite clear how to reproduce the problem. You cannot compare document with revisions. Before comparison all revisions must be accepted. If possible could you please provide a full code or step by step manual how to reproduce the problem?

there are revision marks in the document, after acceptance, see the code and save, try to compare the documents in the MS Word application. Yes, you must accept revision marks again when comparing.
I am trying to create a simple example from multiple operations.

@benestom What document the output document produced by Aspose.Words should be compared with?
The first document is Aspose.Words document produced by the following code:

Document doc = new Document("in.docx");
doc .Revisions.AcceptAll();
doc .Save("first.docx"); //<----- this is the first document

What is the second document it should be compared with?

“In” with “first” in MS Word, and you will find the differences

@benestom Unfortunately, I cannot reproduce the problem on my side. I have created a document using Aspose.Words using the following code:

Document doc = new Document(@"C:\Temp\in.docx");
doc.Revisions.AcceptAll();
doc.Save(@"C:\Temp\out.docx"); 

Then accepted all revisions in in.docx document and saved it as ms.docx.
Then compared out.docx with ms.docx documents using MS Word and MS Word does not show any changes in the document.
I compared out.docx with ms.docx documents using Aspose.Words and it also does not show any chnages:

Document doc_out = new Document(@"C:\Temp\out.docx");
Document doc_ms = new Document(@"C:\Temp\ms.docx");
doc_out.Compare(doc_ms, "AW", DateTime.Now);
Console.WriteLine(doc_out.HasRevisions);
doc_out.Save(@"C:\Temp\result.docx");

not possible.
I repeat everything:

Document doc = new Document(@"C:\Temp\in.docx");
doc.Revisions.AcceptAll();
doc.Save(@"C:\Temp\first.docx"); 

prime1TSD130_P01.docx.docx (30.4 KB)

first.docx (29.2 KB)

After open Application MS Word and compare “In” and “First”
“in” = “prime1TSD130_P01”
comparing


comparingAceptRevisionOnDocuments

And in result is revision mark - diference in dokument

comparedoc:

compare.docx (37.6 KB)

@benestom Thank you for additional information. I managed to reproduce the problem but only if accept revisions in the source document upon comparing documents. If accept revisions in the source document using MS Word and save it and then compare documents, MS Word does notsee any differences:
Aspose.Words: out.docx (29.2 KB)
MS Word: ms.docx (36.8 KB)

The same problem occurs if compare the source document with ms.docx if accept revisions in the source document upon comparing documents. So I do not see problem in Aspose.Words.

The issues you have found earlier (filed as WORDSNET-26533) have been fixed in this Aspose.Words for .NET 24.6 update also available on NuGet.