Tuesday, June 5, 2012

Remove editing restrictions in Word 2010 with 7zip

So you forgot or lost the password to unlock that important Word 2010 form. Not to worry. After reading this post on spiceworks I worked out this technique to unlock a .docx for editing. I doubt this will work with a document that isn't readable without a password but I haven't tested. What follows is a step by step that assumes you have 7zip installed (with explorer extensions).

  1. Make a copy of the original document and rename it to have the .zip extension.
  2. Extract .zip file and in the contents find word\settings.xml
  3. Edit settings.xml to remove the XML element beginning with w:documentprotection. Remove everything including < and >
  4. Copy the word directory to the same location as your document.zip file.
  5. Rename your file to word.zip
  6. Right click word directory and choose 7zip -> Add to "word.zip"
  7. Rename word.zip to yourformname.docx
  8. Do a little dance and be happy that this episode of your life is now over.

That's all there is to it: easy as pi!

26 comments:

  1. I'm confused with steps 4 through to 7. I copy my word folder to the directory that the original doc.zip is, and rename it to word.zip, then using 7zip add to zip, resulting in word.zip.zip and then rename this to doc.zip.docx. This file doesn't work. Surely at some point i add this word.zip or evening the word directory to the original doc.zip file, no?

    ReplyDelete
    Replies
    1. Nope, you don't rename the directory. You are renaming your fomer .docx in step 5. I'm glad you got it working though! Perhaps my wording (excuse the pun) was a little unclear. Maybe your clarification will help somebody.

      Delete
    2. Very good points you wrote here..Great stuff...I think you've made some truly interesting points.Keep up the good work. this

      Delete
  2. found these steps worked for me;

    •Make a copy of the original document and rename it to have the .zip extension.
    •Extract .zip file and in the contents find word\settings.xml.
    •Edit settings.xml to remove the XML element beginning with "w:documentprotection". Remove everything including < and > and save the file.
    •Open the yourforname.zip in 7zip
    •Copy the word directory with edited xml to the same location in your yourforname.zip.
    •Rename yourforname.zip to yourformname.docx.
    •Do a little dance and be happy that this episode of your life is now over.

    ReplyDelete
  3. I'm sorry, but I found these instructions to be confusing (even Adam Grace's revised version). I think part of the issue is that you are supposed to over-write the "word" folder in the 7-zip archive. That part wasn't clear to me, until I actually did the procedure. Also, in order to copy the "word" folder, you have to use your mouse to drag it from a Windows Explorer window into the 7-zip archive window. I didn't see any other way to copy it. The final part that wasn't clear is that 7-zip seems to automatically save the new version of your zip document, without the need for you to do anything explicitly to save it (in fact, I didn't see any option to save it). At least, that's how it seemed to work for me.

    ReplyDelete
  4. Thank you JoshuaJon!!! It works!

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. FWIW, this worked, though I simplified the procedure. I also had to start with a .doc document, so I did a Save As to get the document into a .docx format. Here are my steps from that point:

    - make a copy of the file
    - change the extension to .zip
    - open with 7zip file manager
    - highlight the word directory and double-click to open it
    - highlight the settings.xml file and press F4 to edit it
    - search for and remove the "w:documentprotection" element and the < and > symbols
    - save settings.xml and close the editor
    - 7zip will ask to update the changed settings.xml file in the archive, say OK
    - close 7zip
    - change the file extension back to .docx
    - open with Word, protection has been removed

    Note: if you are adventurous you can right click on the .docx file and have it open with 7zip, achieving the same results without having to rename the file's extension. This does NOT work with older MS Office documents, just the newer .???x style documents.

    (Edited to include symbols that were removed by Blogger in original post.)

    ReplyDelete
    Replies
    1. Hi, I'm trying this now and I can't see any "settings.xml" file in the word directory? When I open .zip in 7z I only see "EncryptionInfo", "EncryptedPackage" and a folder "[6] Dataspaces" which has a few more files in it, none of them settings.xml.

      Delete
    2. "w:documentprotection isnt anywhere to be seen when the edit window is opened

      Delete
  7. This worked for me. Can't believe it was this ridiculously easy to remove the copy protection.

    ReplyDelete
  8. I used this on a couple of documents that had editing protection and once you get the hang of it it is extremely easy. Thank you for a very useful tip

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. Let me try again:

    If you have 7-Zip this can be done way easier:

    1) Right click the docx, go 7-Zip -> Open
    2) Go into "word" folder
    3) Right click settings.xml, click "Edit"
    4) Edit out the w:documentprotection tag as per the instructions (to clarify: you have to select from (angle bracket)w:documentprotection ... />, ... being a lot of key="value" things. Also you have to remove the first /> that comes after the documentprotection... A whole xml tag.
    5) Save the file, close Notepad
    6) 7-Zip should pop up a message asking if you want to save the changes back into the file, say yes.
    7) Close 7-zip, open it in Word. DONE.

    ReplyDelete
  11. will see settings.xml file if you try with DOCX. Try in word a save as, and later, follow those steps.

    ReplyDelete
  12. Thanks for the inspirational post. I had to do this today for a client, your steps came in handy.

    I reblogged the process with screenshots (and credit to you, of course) here : http://www.euclidnet.com/how-to-remove-password-editing-restrictions-on-ms-word-and-excel-files/

    ReplyDelete
  13. Holy cow... this was really hard for me to figure out (until I saved the document as .docx) then I was able to go through the steps with ease and it worked. You have no idea how helpful this will be to streamlining a process within my company! THANK YOU!!

    ReplyDelete
  14. I get the same thing as the people below. Any ideas?!?!?

    kaiparaboyFebruary 11, 2013 at 2:25 AM
    Hi, I'm trying this now and I can't see any "settings.xml" file in the word directory? When I open .zip in 7z I only see "EncryptionInfo", "EncryptedPackage" and a folder "[6] Dataspaces" which has a few more files in it, none of them settings.xml.


    *chronic* thinkerApril 7, 2013 at 3:55 PM
    "w:documentprotection isnt anywhere to be seen when the edit window is opened

    ReplyDelete
  15. This is awesome. Take that, original document author!

    ReplyDelete
  16. This process does not works with files that are already password protected. If the file has password, then following the process will result in EncryptionInfo", "EncryptedPackage".

    ReplyDelete
    Replies
    1. what to do with "EncryptedPackage", i cant find anything to edit inside that...plz help,
      It is a Power Point Preserntation

      Delete
  17. Is there Any Way to remove restriction from Power Point Presentation?

    ReplyDelete
  18. save as ajj gak bisa gmna mau ganti type jadi Zip.. tolong solusi gan

    ReplyDelete
  19. Forms do not work after we do this

    ReplyDelete