Sunday 15 September 2019

How can I unlock a Microsoft .docx document?


I have a Microsoft .docx document that is locked down and can't even be viewed without the forgotten password.


I'm wondering if there is an easy way to unlock it or get the computer to remember the password itself with a hint or something.



Answer



DocX is a compressed zip container file. Make a copy of the original docx file. If you unzip it, there is a subfolder named word with a file named settings.xml. You can open settings.xml with a plain text editor.


Within that there is a block of text:


w:edit=""
w:enforcement="1"
w:cryptProviderType=""
w:cryptAlgorithmClass=""
w:cryptAlgorithmType=""
w:cryptAlgorithmSid=""
w:cryptSpinCount=""
w:hash=""
w:salt=""/>

You can either change w:enforcement value to 0 or remove the block entirely.


Then you zip up the whole thing again (don't zip up the whole folder: the content_types.xml and subfolders must be root of the zip file.), rename the result to have a Docx extension, and then open it in word.


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...