How to clear the editable password

Hi to all,
I have a question that a document cannot be edited if it has been protected by editing password. How to clear this password by aspose.words.dll version 14 based on VB.net?

Thanks in advance!

Ducaisoft

@ducaisoft,

Please ZIP and attach your sample Word document here for testing. We will then investigate the issue on our end and provide you more information.

AsposeTests.zip (72.4 KB)
Thank you for your response!
Please refer to the testing doc files and the demo VB.net project.

@ducaisoft,

You can remove protection from the document by providing correct password to the Document.Unprotect method.

Document doc = new Document("E:\\AsposeTests\\Input.docx");
doc.Unprotect("000000");
doc.Save("E:\\AsposeTests\\19.1.docx"); 

Hope, this helps.

Thank you very much for your prompt response!

A new issue appear if the protection password is not known. If so ,how to clear the password or unprotect document?

@ducaisoft,

Then you can use the other overload of Unprotect method (the one that does not take any parameters):

Document doc = new Document("E:\\AsposeTests\\Input.doc");
doc.Unprotect();
doc.Save("E:\\AsposeTests\\19.1.doc");

It works! Well done!
Thanks!