Password protected documents

Hi,

I use Aspose.Word and very happy how it works. But I am afraid how it works with Password Protected document. As far I know MS Word has a lot of encryption algorithms and user can choose it and protect his document with selected one.
So my question is: can I use Aspose without any fear and be sure, that it will open any password protected documents that were created by MS Word?

Many thanks,
Alex Shloma

Hi Alex,

Thanks for your inquiry. Encrypted documents can be loaded into Aspose.Words as long as the password supplied on load for the document is correct.

Document doc = new Document("Document.LoadEncrypted.doc", newLoadOptions("password"));

XOR obfuscation is currently unsupported. Opening documents encrypted using the ECMA-376 Standard Encryption or Agile Encryption is supported. Opening documents encrypted using the Extensible Encryption is not supported.

Aspose.Words supports most document’s protection features.

You can use DocSaveOptions.Password property sets a password to encrypt document using RC4 encryption method as shown in following code snippet.Use Document.Protect method to protects the document with specificprotection type.

Document doc = new Document();
DocSaveOptions options = new DocSaveOptions(SaveFormat.Doc);
options.Password = "test";
doc.Save(MyDir + "AsposeOut.doc", options);

Please read following documentation links for your kind reference.
https://reference.aspose.com/words/net/aspose.words.saving/docsaveoptions
https://reference.aspose.com/words/net/aspose.words.saving/ooxmlsaveoptions

Thank you for explanation.

Best regards,
Alex Shloma

Hi Alex,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.