Free Support Forum - aspose.com

How to clear all previous text in Docx File

Hi my teacher have given me a project in which i have to extract text from the docx file and then i have to encrypt that text then put it back on the same file. the problem that i am facing is that i cant clear all the previous text in the docx file... is there any function or any way that i can complete this task.... Thank You......

Hi Arsalan,


Thanks for your inquiry. I believe, you will be able to extract text from Word document after reading the article suggested below:
http://www.aspose.com/docs/display/wordsnet/How+to++Extract+Text+Only

You can also remove existing content of Word document by using Document.RemoveAllChildren() method.

Moreover, please read the following article to learn about how to insert content in document using DocumentBuilder class:
http://www.aspose.com/docs/display/wordsnet/Inserting+Document+Elements

I hope, this helps.

Best regards,