Hi samdev,
Quote:
Originally Posted by samdev
Hii MACROPOD,
I am trying to decrypt the password using default setting of security in office 2010. During surfing on internet what i have got is that Windows is used only for change of security settings for password through registry keys. But in both cases encryption algorithm steps are same.
|
AFAIK, the password is not stored in the document under any of the secure encryption algorithms, though I believe it may have been in some of the earlier (eg 1990-1999) Word versions. If I am correct about that, you won't be able to decrypt the password; rather, the password provides the key to decrypt the document. If all you want to do is to open a password-protected document via code, all you need is some vba code like:
Code:
Documents.Open FileName:="Document name & path", _
PasswordDocument:="Password for opening the document", _
WritePasswordDocument:="Password for saving changes to the document"
You don't need to know anything about the encryption algorithm used for the encryption; a token representing the type of encryption will be stored in the document. Any tokens used by Word 2007 will also be used by Word 2010. As per the article in the MS link, a Word 2010 document may have some different tokens to represent the new encryption methods, but the old ones will be the same.