How do I unlock the file that I locked it with a password that seems to stop working for this file only?

I have a locked file that I use everyday.
Only this morning, I found that the password to unlock this file seems to have stopped working: other files locked with the same password open with no problems.
I get the same message below for this problem:


File format error found at
SAXParseException: '[word/document.xml line 2]: Attribute w:cstheme redefined
', Stream ‘word/document.xml’, Line 2, Column 575077(row,col).

This isn’t a problem with password. It has been corrupted, and this specific corruption is known to be caused by some earlier versions (not sure now, but iirc 5.1.x?)

To recover, you may unzip the DOCX as a normal zip file, edit word/document.xml in a plain text editor to remove double w:cstheme definitions, and replace it in original DOCX. This will completely restore the file without any data loss.

Edit: well, the password protection here may be problem though… if you have password set to edit document, then it may be recovered using steps above; however, if that’s password for opening document, then the ZIP will only contain encrypted package. Then you may use current master (daily from e.g. http://dev-builds.libreoffice.org/daily/master/Win-x86@42/) to open it, because in it there will be an option to continue on error. However, the latter option may loose some information.

My reading of the OQ essentially seems to ask: how to break in and get past a password. Pretty slick question to get an expert (you) to explain how to break in. :stuck_out_tongue:

:slight_smile: No, I suppose that OP does have the password; otherwise, there wouldn’t be the error message cited (“File format error found at SAXParseException…”). So, The real question is how to recover the corruption, and I believe that using current daily build is a proper way.

@mikekaganski, You’re prob. right. But spoofing is fun to lookout for it. Let’s see. Purposefully damage a file, then complain it’s not working. Site some believable evidence, like the error message above. I think the correct solution to the OQ here, is: Recover from a backup. Furthermore, when using security such as a password, please know that if something goes wrong (like file corruption), you might have to recover from a backup. Period.