Password protection not working for .docx

Hi,

I wanted to create a word document in 2007 format (.docx) with password protected.

I used the below code. When I open the generated document in 2007 and select un-protect option it is prompting for the password. But when I do the same in 2003, it un-protects the doucment without prompting for password.

doc.protect(ProtectionType.ALLOW_ONLY_FORM_FIELDS, "12345");
doc.save(byteArrayOutputStream, SaveFormat.DOCX);

Is this a known issues or am I doing something wrong ?

Hi
Thanks for your request. Unfortunately, Aspose.Words does not allow encrypting MS Word documents. At the moment you can only protect documents.
https://docs.aspose.com/words/net/protect-or-encrypt-a-document/
But there is no way to set password to open the documents.
Your request has been linked to the appropriate issue. We will let you know once this feature is available.
Best regards,

The issues you have found earlier (filed as WORDSNET-1724) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(25)