Hello,
We are currently evaluating Aspose.Words for Python with the intention of purchasing a license for our document processing pipeline. However, we have encountered a critical issue during testing that is blocking us from moving forward.
Environment:
- Aspose.Words for Python 26.2.0
- Microsoft Word (latest)
Our workflow:
- We start with an original DOCX (document A).
- We apply text corrections programmatically to produce a modified DOCX (document B).
- We call document_a.compare(document_b, author, date) to generate Track Changes between the two versions.
- The resulting document is opened in Microsoft Word, where a human reviewer accepts or rejects each revision bubble.
Expected behavior:
- ACCEPT → the new corrected text is kept.
- REJECT → the original text from document A is restored.
Actual behavior:
- REJECT → the text is deleted entirely. The original text is NOT restored. The paragraph is left empty or incomplete.
What we have verified:
- Document A contains the correct original text before compare().
- Document B contains the corrected text.
- The compare() call generates w:ins and w:del marks that appear correctly as bubbles in Word.
- However, when the reviewer clicks Reject in Word, it removes the w:ins content but does NOT reinstate the w:del content. The result is an empty or broken paragraph.
Question:
Is there a specific configuration required when calling compare() to ensure that rejecting a revision correctly restores the original text? Are there known limitations in how Aspose.Words generates w:del blocks that affect Word’s ability to restore them on rejection?
We can attach sample documents (original, modified, and compare() output) if it helps reproduce the issue.
We are very interested in purchasing this product but need this behavior to work correctly before we can commit. Any help is greatly appreciated.
Thank you.
@Tregolam Could you please attach your input document and output documents along with code that will allow us to reproduce the problem? We will check the issue and provide you more information.
Hi,
Attached are the three files:
pre_f3b.docx — original document (input to Compare)
post_f3b.docx — corrected document (input to Compare)
test_compare.docx — output of Document.Compare()
We ran AcceptAllRevisions() on both documents before calling Compare().
The issue: when opening test_compare.docx in Microsoft Word and manually rejecting a tracked change, the text disappears instead of being restored to the original.
Important: we tested rejecting all revisions programmatically (Revisions.RejectAll()) and the result is correct — all original text is preserved. The problem only happens when rejecting manually in Word.
This suggests the revision structure generated by Compare() is not fully compatible with how Word handles manual rejection.
Aspose.Words version: 26.2.0
post_f3b.docx (21,3 KB)
pre_f3b.docx (21,2 KB)
test_compare.docx (33,2 KB)
@Tregolam Thank you for additional information. I have tested the scenario on my side and could not reproduce the problem. I used the following simple code to compare your documents:
v1 = aw.Document("C:\\Temp\\v1.docx")
v2 = aw.Document("C:\\Temp\\v2.docx")
v1.compare(v2, "AW", datetime.date.today())
v1.save("C:\\Temp\\out.docx")
Here is the produced output: out.docx (22.3 KB)
Then I rejected all revisions using Aspose.Words:
doc = aw.Document("C:\\Temp\\out.docx")
doc.revisions.reject_all()
doc.save("C:\\Temp\\out_rejected_by_aw.docx")
out_rejected_by_aw.docx (21.4 KB)
And did the same using MS Word:
out_rejected_by_ms.docx (21.2 KB)
As you can see both out_rejected_by_aw.docx and out_rejected_by_ms.docx produced on my side are the same.
Hi,
Thank you for your response. We have tested further and can confirm the issue is reproducible with our generated output file.
When opening the attached document in Microsoft Word and manually rejecting any tracked change bubble (right-click → Reject Change), the original text disappears instead of being restored.
We are attaching a screen recording / screenshot showing exactly this behavior.
Note: programmatic rejection via Revisions.RejectAll() works correctly — the original text is preserved. The problem only occurs when rejecting manually in Word.
Could you please open the attached output file directly in Microsoft Word and try rejecting a change manually? We believe the issue is specific to how Word interprets the revision structure generated by Compare(), not in the programmatic rejection.
Prueba Ana Garcia_corregido_20260310_091616.docx (19,6 KB)
@Tregolam I tested your document with MS Word 2019 on my side and cannot see the problem. To make it easier to see the deleted text I switched to inline revisions view:
After rejecting the revision:
Also, out_rejected_by_ms.docx document, which I have attached in my previous post what produced by MS Word by accepting all revisions.
Hi Alexey,
Thank you for testing the document. We have now been able to isolate the issue more precisely.
The problem is specific to Microsoft Word’s “Show Revisions in Balloons” view (Review → Show Markup → Balloons → Show Revisions in Balloons).
When using this view and manually rejecting a revision balloon, the original text is deleted instead of being restored. The proposed (inserted) text remains in the document.
Inline view works correctly — when switching to “Show All Revisions Inline”, accepting and rejecting revisions behaves as expected.
We have confirmed this with multiple users and documents generated by our pipeline using Document.compare().
Steps to reproduce:
- Generate a comparison document using Document.compare()
- Open the result in Microsoft Word
- Switch to: Review → Show Markup → Balloons → Show Revisions in Balloons
- Right-click any revision balloon → Reject Change
- The original text disappears instead of being restored
This is a significant issue for our workflow as the balloon view is the preferred view for authors reviewing corrections.
Could you please test specifically in balloon view? We believe the revision XML structure generated by Aspose.compare() is not fully compatible with Word’s balloon rejection behavior.
Thank you.
@Tregolam The scenario works correctly on my side with revisions shown in balloons too.
before rejecting:
after rejecting:
As you can see the deleted text has been properly restored.
Hi Alexey,
Thank you for testing this so thoroughly. After further investigation on our side, we confirmed the issue was related to a Word rendering/cache problem — switching views and back resolved it completely.
The documents generated by Aspose.compare() are working correctly in both inline and balloon views.
We apologize for the confusion and appreciate your patience and support.
Best regards
@Tregolam It is perfect that you managed to resolve the problem. Please feel free to ask in case of any issues, we are always glad to help you.