Track Changes Confusion

Hello.

Currently i’m working on some word document comparison library and i’m using Aspose.Words 9.2.0.0 to manipulate word documents.

Our situation is specific, because the documents, that are going to be compared are copies of the base document, which just has to be confirmed by many divisions (like lawyers etc). So we have a few copies of the same documents with possible changes.

Our solution to achieve the goal is very simple. We are enabling TrackingChanges in the copied document and in the end we are parsing the base document with the copied document (from all divisions).
And the problem starts. At the beginning i was just tagging changes with the Comment and it worked really okay. But our client want to accept or refuse these changes by clicking accept/reject in Word.

As it is said in documentation:
“Changes made to the document using Aspose.Words are never tracked as revisions.”,
but i’ve noticed that when i imported a new paragraph i.e. to the base document and inserts it in proper place it is marked as revision (so i can accept/reject it in word). But when i want to remove the paragraph which was removed in changed/copied document the revision notifiaction/comment is never shown, so i cannot even see that something was deleted. Ofcourse the TrackChanges is enabled in the base document - inserting works okay.

I’m not sure if i’m missing something or maybe only the delete revisions are not marked (and than there is something wrong with documentation).

Best regards

Hello

Thanks for your request. Could you please attach the input and output documents and the simple code which will allow me to reproduce the problem on my side? I will check it and provide you more information.
Best regards,

Code and documents are attached.

Best regards

Hello
Thank you for additional information. It seems there is no problem there. MS Word does not show balloons for inserted text. If you try specifying “Show Revisions in Balloons” you will see balloons for deleted text, but not for inserted.
Best regards,

Hello,

Thanks for Your response.
What version of MS Word are You using? We’re currently developing our solution with Word 2003, and it is not working even when balloons should be shown always.
I know that ballons are not shown for insert revision by default, but it’s ok since it appears in document and can be rejected or accepted by clicking right mouse on it.

Hello

Thank you for additional information. I use MS Word 2007 for testing also I have tested in MS Word 2003 and all works as expected. Could you please attach your output document here for testing?
Best regards,

Hello,

The output documents are attached.

I’m going to try it on W2007 and perhaps on W2010, but still our clients uses W2003 mainly.

Thanks a lot.

Best regards,

Hello
Thank you for additional information. I have tasted with MS Word 2003 and all works fine.
Best regards,

Hello,

So to make it clear, using our code (and RevisionDocumentProcessor to process documents) and Word2003, You can see balloons for deleted revisions and also inserted paragraphs are highlighted in the output document (in W2003 inserted revisions usually apear with underline and blue/red colour)?

I was struggling yesterday to achieve this, but deleted revisions (the balloons) just dont show iny my output document, while inserted are visible.

Thanks for Your help.

Hello

Thanks for your inquiry. I simplified the code to just copy paragraphs from one document to another. The source document contains two paragraphs: one deleted and one inserted (see the attachment). I used the following code to copy paragraphs from the source document to the destination document:

// Open source and destination documents.
Document dst = new Document(@"Test001\dst.doc");
Document src = new Document(@"Test001\src.doc");
// Copy paragraphs from the source docuemnt into destination document.
foreach(Paragraph paragraph in src.FirstSection.Body.Paragraphs)
{
    Node dstNode = dst.ImportNode(paragraph, true, ImportFormatMode.UseDestinationStyles);
    dst.FirstSection.Body.AppendChild(dstNode);
}
// Save output document.
dst.Save(@"Test001\out.doc");

As you can see both deleted and inserted paragraphs are properly copied between documents.
Best regards,

Hello,

Finally code You provided realized me what i was doing wrong. I was removing the paragraph, hoping that it would be marked as delete revisions. Now i’ve changed the solution, to copy delete revisions paragraphs, and it is working okay.

Thanks,
Best Regards,

It is perfect, that you already resolved the problem. Please let me know in case of any issues. I will be glad to help you.
Best regards,