Error opening 160 page document due tomorrow, in part:/word/document.xml, line 2, Column 0

Hi everybody, 

I just tried to open my very nearly done project, to put on finishing touches and submit online, when I could not open it in Microsoft Word. It throws the error described in the title, and below:

Unable to open contents, unspecified error
Location: part:/word/document.xml, line 2, Column 0 

EDIT: I have now fixed the problem. If anybody finds this topic, I solved it using the guide found here written by 3ICE:

I'm copy pasting his guide in case the link ever goes bad. All credit goes to him, not me:

Hi,

I fixed it.
It took me 20 minutes of unfruitful (fruitless?) research and then a mere 5 minutes of basic xml editing to fix the document in question. Then I spent an hour writing (and proofreading and proofreading again) this guide and now it is 1 am...

Steps:

  1. Change your file extension from docx to zip *
  2. Delete a random file from the archive and it will trigger text recovery in word. And what's great is that I was able to recover all of my equations, not just the text! (I deleted the entire customXml folder for it looked suspicious/useless. But you can probably delete something smaller, like word\fontTable.xml or word\webSettings.xml.)
  3. Extract word/document.xml *
  4. Using a Programmer's Notepad (I prefer Notepad++) replace >< with >\r\n< in extended mode to make the XML more readable, putting each tag on its own line. (The expression \r\n stands for new line in windows.) You can use regexp mode or multi-line replace in other text editors, or copy a newline/hidden paragraph symbol and paste it in the replace box. (Which works even in Word.)
  5. Import the modified word/document.xml back into the archive *
  6. Rename it back from zip to docx *
  7. Attempt to open the document
  8. Note that this time the error message will be more useful, for example it will tell you that the error is at: line 13540, as opposed to line 2 column 0.
  9. Go to the line specified (was 13540 for me) and remove it. And the tags around it too, if necessary. Make sure you keep the XML well-formatted! (You can attempt to fix the erroneous line instead of removing it, but usually the indicated line is as useless as the other lines around it, so removal will not result in any loss of data. See the note** below for why this is.)
  10. Import document.xml and rename zip/docx as usual. *
  11. Repeat steps 7-10 until your document is recovered. (Took me 5 repeats, as more errors arose at lines 15870, 13595, 13222 and 10835.*** (Not sure why it found errors in reverse order, but it did.)

* These steps are unnecessary if you use Total Commander (or other advanced file managers). It can look inside docx files as if they were folders because it automatically recognizes them as compressed archives. It also lets you edit files easier, just press F4. And it even detects file changes and asks if it should reimport your edited files into the archive upon closing the editor.

** Note: To me it seems that none of the errors were real. While the source code was extremely bloated and wasteful, every indicated error was a line with completely well formed XML. (Around it was good XML too.) For pages and pages, almost every line repeated the same statement:

<w:rPr><w:rFonts w:ascii="Cambria Math" w:hAnsi="Cambria Math"/></w:rPr>

*** There is no reason to pay attention to my line numbers, I only included them to show you how many lines my document had. Over ten thousand lines of XML just to describe an 8 pages long document... Crazy!
*** And of course the case of word finding errors in reverse order is quite peculiar.

--Daniel "3ICE" Berezvai

Answer
Answer

Glad to know you fixed the issue. Thank you for sharing the resolution, as this would help other members of the community facing the same issue.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 5, 2021 Views 370 Applies to: