got error loading docx

File format error found at when trying to open the file
SAXParseException: '[word/document.xml line 2]: Attribute w:hAnsiTheme redefined
', Stream ‘word/document.xml’, Line 2, Column 86307(row,col).

noting in the backup folder. Windows 10/ libreoffice 5.1.4.2 x64

how can I fix/recover the file?

thanks

You can convert your corrupted doc or docx in pdf first from given link https://www.freepdfconvert.com/ and then change it to pdf to doc. Try It. May be possible to get 90% data back.

Make a copy of the file, change the extension to ‘zip’, extract the ‘word/document.xml’ from the archive, open it in a real plain text editor, or a real XML editor (one that doesn’t refuse to open a file with errors), remove the error, save, enter it in the archive and it should work.

original file was in LibreOffice. I pasted some comments from a MS word doc. but I am not sure that was the cause of the problem. maybe too many xml clauses switching between languages. Sadly I am back to using MS Word… thanks for the help.

Not easy to fix the error. there seem to be many. And the text seems truncated. probably a bug in LibreOffice. I should say the language of the doc is Hebrew with some english characters. is it possible that there is more text that is not visible in the document.xml file that I could retrieve?

How did you get the file in that state? Was it converted from LibreOffice, did you get it from somebody? It’s on you to provide all the information that other people need so they can help you.
The AOO community forum may be a better place to get help because there aren’t any restrictions on posting there and it has many experienced users of Libre as well.