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

Free Support Forum - aspose.com

How to Get Text of Document Without Deleted Revisions using .NET

Hi Tahir,

Can we get text without Document.AcceptAllRevisions because we need to reflect track revisions as well.


Yes, you can get the document’s text without call of Document.AcceptAllRevisions. If you face any issue, please ZIP and attach your document here for testing. We will investigate the issue and provide you more information on it.

I’m able to get text but the text containing the deleted text as well.
Code I’m using
string spellText = p.ToString(SaveFormat.Text).Trim();


If you want to ignore some revision text, you need to iterate over Run nodes of document. You can use Run.IsInsertRevision and Run.IsDeleteRevision properties to check either the text has inserted and deleted revision or not.

If you still face problem, please ZIP and attach your input Word document and expected output. We will then provide you more information on it.