We've recently noticed an issue where documents are becoming corrupt after making edits and saving the file. There have been multiple forum threads related to this particular issue and the purpose of this blog is to try and give you some ideas for how to correct the problem.
The one disclaimer worth mentioning is that this is not a 100% fix for all corrupt documents, nor will it fix all documents that give you the specific error message noted below. The idea is to try and give you some options for getting your document back to a state where you can make edits/changes.
Opening a Word document gives you an error "The file <filename> cannot be opened because there are problems with the contents.
The name in the end tag of the element must match the element type in the start tag. Location: Part: /word/document.xml, Line: 2, Column: 129414"
If you came to this blog from the FixIt KB article http://support.microsoft.com/kb/2528942, you can use the steps below to try and edit the document so that the issue does not keep re-occurring when you make more edits to the document and save the file. After running the FixIt you should be able open the document in Word without getting an error message.
The problem however, still remains in the structure of the document. Typically it's somewhere in an equation or a textbox. If you make any edit to the document that doesn't correct the behavior and you save the document, you will end up with the document still giving you the error message. It's important to keep in mind that the FixIt solution won't prevent the problem from re-occurring. It can only put the document into a state where Word will be able to open the document.
Next, we get to the workarounds and if you didn't get to this blog post from the KB article, you can go to the article referenced above and run the FixIt solution to correct the document. The KB article also has more information about this particular issue. Once you have the document in a state where you can open it in Word, you can then proceed to the workarounds to try and correct the document.
Lastly, there have been a lot of forum threads related to this particular problem and I would like to say a huge "Thank You!" to the MVP's and everyone else who has been helping people get their documents fixed.
Thank you for posting this, Brandon.
Can you tell us - in xml terms - what the Fixit will do, and whether it will identify the location of the error(s)? Because, if someone has a document with several textboxes and equations it would be beneficial to know which one(s) may need attention if the FixIt has not been a complete success.
Hopefully we will have a KB article for the FixIt soon and it will explain what it does in xml terms, but it will not give the location of the error with any context as it relates to content in the document.
The initial error message mentions the column, so you could go to that column specifically in the document.xml file after the FixIt has corrected the document and look for a clue as to what part of the document has the problem. I could add this as another workaround when we get the FixIt published and update the blog if it will be helpful.
Thanks, Brandon. I look forward to the FixIt.
Only the very dedicated and/or those with specialist software can locate column 500,000 (or 5,000,000 in the one I saw the other day) and then make sense of what they see. I will have to give this some thought :)
Hello, this is wan peng here. can you please email the document to my email address*address removed*
thank you for your kinds
Hi Wan Peng,
I sent the fixed document. Let me know if you have anymore problems.
Thanks for all the tips. I've tried most of the tips on the forums how to fix this type of issue but to no avail my file is still not fixed. I've tried running the FixIt as well as a Rebuilder tool. According to the rebuilder the problem in my document does not involve any Math problems. Please help! I can email you the file if you can take a look at it please. Thanks!
My email:**address removed**
when i opened a document, it said The file could not be found or The directory is not valid. i couldnt find the problem or how to open the file . i tried to open a copy but it said , the file couldnt be found. PLEASE HELP ! thank you <3 gabby
Are you getting this message when using the FixIt article KB2528942 or is this just in general that you are seeing this behavior?
Hi Gabrielle, could you fix my document?
i also need help...i can't open my document, here is the link of my file: www.mediafire.com
if someone managed to recover it, please email me at firstname.lastname@example.org
thanks in advance.
I'm having the same problems as Rhet. I ran the Fixit tool for the same error message about mismatching endtags and it said that the problem was not with omath tags even though I have a ton of equations in my document. I can email you the document from email@example.com
Hi Brandon De, I emailed via this blog about the possibility of getting a Word 2010 doc fixed for an end tag error. Any luck with that?
Unfortunately, I haven't seen anything come in that you sent. Would it be possible try the "Email blog author" option again?
I just emailed a new request, via the Email blog author, with a link to download the file.
Dear Brandon I don't know which part of my document.xml file has problem and i should fix it.
may I have your Email?