Today while I was editing a document suddenly Word crashed and the document became unable to be opened. Every time I wanted to open it the same error was:
We’re sorry. We can’t open DocumentName.docx because we found a problem with its contents.
When I want to see Details the following message shows:
Unspecified error
Location: Part: /word/document.xml, Line 2, Column: 0.
Then I wanted to open auto-saved version of the document, the same error appeared. So I changed the DocumentName.docx file in to DocumentName.zip, and extract the content, found document.xml file and opened it in Notepad++.
The picture below shows the content of the DocumentName.docx file, renamed in to zip and extracted:
If you didn’t know the word document with doc or docx extension is actually zip file, which you can extract.
I have opened the docuemnt.xml and try to find error in second line. This was mission impossible because all xml content is placed in this line. As you can see on the picture below:
To find which element cause the content problem we have to format XML content. I prefer using Notepad++ and XML Tool PlugIn. It can be installed through Plungins menu of Notepad++.
To format xml content choose option Pretty print (XML only – with line breaks) . After the content is formatted, back the Document.xml to zip, change the extension from zip to docx, and open the word document.
The same error appear, but when you choose for details you can read in which line is the error. Find the line in Notepad++ and delete whole tag element:
Copy document.xml back in to zip file, rename the extension and try to open. If you have another error, repeat the process again, otherwise your document is opened.
Reblogged this on Sutoprise Avenue, A SutoCom Source.
Hi
I have the same problem
But my XML Plugins comes with nothing
Are you able to help?
Just saying thanks, your solution has been truly helpful!!
Thanks from me as well, really a life saver!
Thanks you so much! I had a 150 page word file with lots of equations and you saved my whole document! Thanks!
Great post – the Notepad ++ XML plugin is what helped me and I fixed the issue.
great job! thank you for sharing!
Thanks! This really worked for me!
You just saved me from a day full of tears. Thank you, sweet person.
i dont understand how to change from docx into zip file. can u explain more?
Change ext from docx to zip. That’s all.
can you give me your mail id i am also facing same problem
Please, see in About page
Hey I dont understand when I change the .docx file to .zip cause it wont extract.
I can’t install the xml plugin i tried dragging into the note++ document but its not allowing me to do it!
please help. After I change the docx to zip, should I extract the both document.xml? one has path word\ and the other has path word\glossary\. or should I extract the whole content of the zip file into a folder.
Also after Pretty print (XML only – with line breaks), should I save the document.xml file and replace the one in the original zip file.
I’ve tried a number of times but when I get to open the file, no line number is given. just says file corrupted or something missing
thanks
same thing happened to me
what should I do?
a 150 page translated word file gone :(
That kind of thinking shows you’re on top of your game
Pingback: How To Fix Microsoft Word Error Problem With Contents in Windows
Thanks, Worked for me… This guy deserves a bottle of champaigne. :)
Thank you, it work for me.
Puno hvala CARE kralju!!!
Pingback: How to Fix Unspecified error Location: Part: /word/comments.xml, Line 2, Column: | Max in Words
Could you help me? My Notepad++ appeared “Error detected in content. Please correct them before applying pretty print” How to solve this?
Many Thanks it’s work for me
You are the best! Very well explained and solved! I.O.U big time!
Can annyone do this for me, I don’t understand how to fix it ! Please ! here is my e-mail : [email protected]
thank you..
it work..
Thanks!!!! it’s work for me, you are my hero!
Hi,
I got the same problem but my error is related to a table tag where i am showing some data. If I remove the table code then the document gets open.The error specifically showing with tag in bottom of the code, there is start tag for this in the code.
Could you help me in this?
This is the code I commented in my document:
State-controlled road
7.3.1
Code:
<!–
State-controlled road
7.3.1
–>
Excellent work my friend, you’re a wizard :) Thank you!
Hi after I format the content XML, then achieve the folder to zip and to docx. when I open the file, it shows in the details : the file is corrupted. cannot be opened. How should I do???
Mine doesn’t show me the exact line, it says “line 2” and that line has all the content
Yes, it will show that unless you do the step above by setting the XML to Pretty Print using Notepad++. After you do that and change the file back to .docx and try to open it again in word, it will tell you the exact line instead of just line 2.
Excellent technique! Thanks for the info.
Thank you!
Many thanks! That fixed my problem too.
Thanks mate, you saved my thesis!
Hi,
When I try to save the document.xml file after applying prettyprint, a popup box appeared, stating:
XML Parsing error at line 29412:
Premature end of data in tag document line 2
I’m completely new to xml editing, so help would be appreciated!
Thank you
Thank you very much!!! Your tip was verrrrrrrrrrry turly helpful!!!!!
Everything was working well. I thought. I deleted a row then went back and forth making changes to the .xml file. The errors continued so I continued to delete the problems. This ended with me removing the last two lines of the .xml file. So when I converted back to Word I ended with “Unexpected end of input. Location: Part:…..Line: xxxx, Column:0.
Is there anything else I can do to correct that issue?
Unfortunately this is only way I know to fix content error problem.
But you probably have deleted bracket/s.
Try to find missing bracket and close it.
Is there any other workaround? If i remove that tag I can open the doc but the information residing in that tag is important and I can deleted them. Just FYI I am doing an automation project using OPEN XML.
Hi,
I’m following your instructions. However, after backing the docmune.xml to zip then changing it to docx, Word 2013 shows this error “Microsoft office cannot open this file because some parts are missing or invalid”. It is not showing a line number or anything else
The instructions weren’t very clear. It took me a whole hour trying out various methods before it worked.
Assuming that you have both “Folder.zip” and “Folder” (unzipped) in your PC.
-In Notepad++, File > Save “document.xml”. It should replace the original file in “Folder” (unzipped).
-Return to “Folder” (unzipped) and find “document.xml” that you just saved. Copy it.
-Open (but not extract) the original “Folder.zip”. Delete “document.xml” stored inside. Paste the new version that you just copied.
-Rename “Folder.zip” to “Folder.docx”.
-Open “Folder.docx”. Click Show Details. The line error should appear. Write it on a piece of paper.
-Rename “Folder.docx” to “Folder.zip”.
-Return to “Folder” (unzipped) and find “document.xml” that you saved in the beginning.
-In Notepad++, find the line that has the error.
-Delete that line and anything else after that it codes for. For example:
Let’s say your error was line 2205. On that line, you see . Scroll down a bit more until you see the first . Delete , , and everything in between. So basically, if you see , you need to delete up until Hopefully, that makes sense.
-File > Save “document.xml”. It should replace the previously saved file in “Folder” (unzipped).
-Return to “Folder” (unzipped) and find “document.xml” that you just saved. Copy it.
-Open (but not extract) the original “Folder.zip”. Delete “document.xml” stored inside. Paste the new version that you just copied.
-Rename “Folder.zip” to “Folder.docx”.
VIOLA! Your file should be recovered! Since you deleted the lines, you might need to retype some missing information in Word.
I guess it didn’t like the coding examples I wrote out. Imagine everything in the as having no spaces.
Let’s say your error was line 2205. On that line, you see . Scroll down a bit more until you see the first . Delete , , and everything in between. So basically, if you see , you need to delete up until the first . Hopefully, that makes sense.
Mate, your “translation” was very helpful too.
Excelente después de varios intentos lo logre…su explicación fue de mucha ayuda
Hello I am having major problems, the endtag was mismatched so made the word doc into a zip file and there seems to a problem with one of the XML files it says there is an unspecified error. Would anyone mind taking a look at my word document. I would be Extremely grateful, I don’t know what else to do!
Hi Zoe, try to open the document with Google Doc Zoho Editor.
Hi Bahrudin,
Thank you for replying but unfortunately this has not worked either. The error code is 0x80004005. Do you have any other ideas?
Thank you! Thank you! Thank you! :D
Excellent post! Thank you very much for taking the time to explain this! I was able to fix my files thanks to your tutorial.
wow this really worked. Thanks so much!!
dude, you’re the best <3
Changed the document name.docx file to.zip, and
Extracted the content,
Found document.xml file and opened it in Notepad++.
Then in notepad chose option Pretty print (XML only – with line breaks).
What should I do next? Please somebody help!!!!!!!!!!!!!
Please read the blog post till end.
I’m getting this error: xml parsing error at line 32612. Extra content at the end of the document. What to do now?
what means deleting the whole tag element? I cant find any botton that is deleting and there is no response when clicking the delete button.
Hi,
each tag element begins < … > adns with </ … >
Example:
<configuration> – begin of the tag element
</configuration> – end of the tag element
Great guide! Saved the day of one of our researchers after google Docs had apparently corrupted his document… thank you so much!
Thanks a lot
Good discussion . I learned a lot from the specifics – Does someone know where my company can obtain a sample IRS W-9 copy to fill in ?
Hi easterbloom1! my assistant located a sample a form example here http://goo.gl/EvtNs4
SAVED MY LIFE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
My team mate has the same problem. I’ve followed your steps and … awesome, it works.
Thank you very much !!!
Pingback: 10 godina pisanja bloga | Bahrudin Hrnjica Blog
My word said :
Xml parsing error
Location: Line 0, Column 0
Please help me
I’m another happy reader who would not have fixed the problem without this article. Are you happy for me to share a link with readers on a LinkedIn group to which I contribute?
This is ok for me to share the acticle.
I am glad the post is of help.
Regards
after I delete the whole tag, the docx still failed to open, it said the doc invalid. help me
I am having the exact same issue – unfortunately, I am unable to open my file at all, be it by saving and extracting as a zip, uploading to Google Docs, using Notepad++… does anyone have any ideas?
You are a genius man!! You save my life!! :)
It’s much easier!!! Open the document with the error in Wordpad, save it again as *.docx and open the new document in Word. Problem solved!
Hi there
Last night I saved my thesis on my memory stick and went to bed. In the morning when I went to try open it again it no longer wanted to open. I am busy trying your method but when I try extract the file it gives me an “Error 0x80004005: Unspecified error” once it reached the document.xml file. What should I do? I have written so much and have to hand in in 2 weeks. Please please help me.
Hi Natascha,
I am sorry to hear you cannot open such document, which is very important to you.
I have explained all I know in the above blog post.
Also try to read all comments here, there are some alternative suggestions how you can open it.
If you still cannot open this document, send it to me via mail, I will try to open it, but I cannot guarantee I will succeed.
Regards
Memory stick like any memory device can fail overnight (it happens to me with a USB key).
Backup is the only viable solution. For important information, follow the 3-2-1 rule
– 3 copies of data
– 2 media types
– 1 copy off site
http://dpbestflow.org/node/262
P.S. It’s too late for you but might help people reading this post later
well… it works you just need to follow instructions exactly and a little common sense
Hello when I try to pretty print with line breaks a pop up window says : “Error detected in content. Please correct them before applying pretty print.”
could you help ?
Thank you very much Bahrudin !!
Excellent Post
Changed the ext to .zip but when I try to unzip it, the ext .cpgz is added onto the end
Try to unzip that and it changes back to .zip
Please help! It’s Valentines Day and I’m stuck doing this stupid report
Hey! I keep deleting the lines it tell me to delete, but seems like they never end. I’ve done for half an hour already. Could I see somewhere how many of them I have to delete?
Thanks a lot in advance!
Hey guys, i can’t fix it, there are so many trouble when i fix it line to line, so anyone could help me , i could help you so much Email: [email protected]
THANKS A LOT !
12H OF WORK RESCUED
This saved my sister’s thesis and ended a whole lot of tears! Much thanks :)
THANK YOU SO MUCH!!!!!!!
You just saved me hours of re-typing equations man. For anyone having trouble, when the author says to convert the document.xml file to a zip file, he means grouping all the extracted files together and THEN converting to a zip file. Then simply change the extension of the zip file to .docx and you should see what line the error is in!
Once again, thank you so much for this help!
Thank you all for the comments. I am glad that this blog post is of help several years and it is still active issue of the Office document.
Thank you, what can i say, finally some sense with this Microsoft stupid error, I’ve always thought this some kind of joke, like ‘Hey something fucked up, go and fix it by your own fixer’, but your post, forget about it, you are just the live saver for our little soul.
After couple of hours of going through other solutions I found this article and it was a breakthrough!
only have to add that in my file problem was not in the tag that Word was reporting, but in the previous one.
Hi.
(1) I downloaded and installed the Notepad++ program. But under “Plugins” there are these items: Converter, DSpellCheck, MIMI Tools. Nothing else is there. :-(
(2) How can I fix an “Xml parsing error: Row 2., Column 2407916” when I am not an XML programmer?
Hi Ferdinand,
you have to install XML Tool plugIn within Notepad++. Please see picture below:
just want to say thanks, your tip saved us hours of work on a CV that we thought was lost, thank you so much.
Thank you, this was very helpful.
Still useful few years later. Thanks a lot for the detailed information.
In my case the error was in line 0 column 0 of /word/header1.xml. The problem was not visible on NP++ even after XML pretty. To fix it I simply replace the whole file with a fresh one from a new document generated from the same template (.dotx).
Thank you. This worked perfectly.
As a note: it won’t work if you completely extract the document to a folder, edit, compress that folder as a zip, then rename it back. It only works if you edit the zip archive in place for some reason. That is, open the zipped folder, extract only the document.xml file, edit it, save it, then drag the edited file back into the compressed folder.
Hi, I am not a person who has great knowledge about the applications or the other parts of computer. But I know how to use MS office suite. i followed the exact same steps as mentioned above and still not able to open the word file. could you please help me with it.
Worked like a charm..well it took me a while to read, investigate and install plugin, but what a learning curve! After struggling for about an hour I discovered Ann’s comments – “Ann on 16/02/2016 at 10:27 said:
The instructions weren’t very clear. It took me a whole hour trying out various methods before it worked.Assuming that you have both “Folder.zip” and “Folder” (unzipped) in your PC…(..) ”
Thanks Ann! It really helped to do follow your step by step zip-ing and docx-ing :) !
It also helped that I discovered not corrupted earlier version of Word document I was trying to fix and then opened its document.xml in Notepad++ for comparison.
I get the same error, but it says “Line: 0 Column: 0” Then how can I fix it? Help me please :(
Do not use words ending of starting with #
This actually saved me!
Thank you!!!!
Hi,
It did not work for me BUT, the BEST AND SIMPLEST SOLUTION is to Install LibreOffice, open the Word file in it, and save it back. The resulting file will open without any problems in Word for Windows or Mac. The copy and formatting will be intact. The only things you might loose are some pictures if there were some in your file. You’ll simply have to re-insert them.
Enjoy!