Accessing document properties of encrypted file

A fix was provided for this in the Aspose.Cells component, can the same thing be done for Aspose.Words as well?

Thank you,
Jeff

Please see my original request in the Cells forum: http://www.aspose.com/community/forums/333171/accessing-document-properties-of-encrypted-file/showthread.aspx#333171

*Jeff B:
Is there a way to access the document properties of a file that has been open protected (encrypted) ?

Windows (Right-click > Properties) will allow you to view properties such as “Author” on an encrypted .xls file that cannot be opened without a password. Is there a way to access those public properties in Aspose? This assumes we would not have the password to provide. We process volumes of Office files and would like to at least get those metadata properties even if we cannot actually access the file contents.

When I try to instantiate an Aspose.Workbook object using an encrypted file I get an exception. Can Aspose access those properties in some other way without actually instantiating a Workbook? Clearly those properties are not encrypted as the operating system can access them without a password.

Microsoft’s DSOFile COM library is also able to expose those properties on the encrypted file.

(I will put this question in the Cells forum, but it seems to be true for Word component too.)

Thanks,
Jeff*

Hi Jeff,

Thanks for your inquiry. I would suggest you to please see the following link to learn how to work with the document properties:
https://docs.aspose.com/words/net/work-with-document-properties/

Also, please see the following link to learn how to un-protect a document:
https://docs.aspose.com/words/net/protect-or-encrypt-a-document/

I hope this will help

Best regards,

I’m not referring to a edit protected document. I mean a document that has password restriction on opening. You cannot open a password encrypted document in MS Word to then save into another format. Without the password you cannot get beyond the open dialogue box.

For Aspose.Words, the behavior is the same as with Aspose.Cells. If you attempt to instantiate a Aspose.Words.Document object using a password protected file an exception is thrown. So you cannot access the Document.BuiltInDocumentProperties.

Hi Jeff,

Thanks for your inquiry. By using office 2007 .docx file and Aspose.Words for .Net v.10.4.0, I managed to reproduce this problem on my side. It seems to me that if a document is protected with a password, Aspose.Words simply can not instantiate Document object as there is no such additional LoadOptions, e.g. OnlyLoadDocumentProperties, that can be specified to be able to access document properties at least.

I hope that Aspose.Words team will log this issue into their issue tracking system.

Best regards,

Hi Jeff,
Thanks for your request. You should simply specify the password to open the encrypted document using Aspose.Words. If you do not know the password, I am afraid, you will ne be able to open this document using Aspose.Words.
Best regards,