As Charles pointed out, this is a common problem. There are a few people on the list who hand fix files. But, they must recognize the question so you MUST edit your subject line, add the words 'XML END TAG error' to it.
Possible fix:
Tony Jolans was the first that I heard of with a tool to fix the problem. Now MS has released a Fix It for one specific variation of the problem.
If the tools don’t fix your problem, the file will have to be fixed manually, repairing the tag order.
The Fix It article notes that the document is still in a fragile state. You have to do some addition fixing to avoid repeats of the problem.
https://blogs.technet.com/b/wordonenotesupport/archive/2011/03/24/error-when-opening-a-word-2007-or-2010-document.aspx
http://support.microsoft.com/kb/2528942 - FIX IT
This fix it will work for one specific tag error where there are equations and graphics in the same paragraph AND Office 2010 SP1 has not been applied.
Let me fix it myself
If you are familiar with editing XML, you can try to fix the problem yourself by correcting the sequence of the mismatched oMath tags in the document. See the following example:
Incorrect tags:
<mc:AlternateContent>
<mc:Choice Requires=”wps”>
<m:oMath>
…
</mc:AlternateContent>
</m:oMath>
Correct tags:
<m:oMath>
<mc:AlternateContent>
<mc:Choice Requires=”wps”>
…
</mc:AlternateContent>
</m:oMath>
Note: You will have to use an application such as Notepad to edit the XML.
Further Fixes
The Fix it solution in this article should let you recover your Word document. However, the symptoms will reappear when you make any further edits to the document unless the core problem in the structure of the document is resolved.
To try to correct the core problem, follow one of these workarounds:
Install Office 2010 Service Pack 1
Office 2010 Service Pack 1 resolves this issue for new files. It will also prevent the problem from recurring with any files that were recovered with the Fix it solution in this article.
To download Office 2010 Service Pack 1, follow the steps provided in this Microsoft knowledge base article:
2460049 - Description of Office 2010 SP1
Grouping Objects
The steps provided work best under Word 2010:
- After you open the recovered document, turn on the
Selection pane. This can be found in the
Home tab of the ribbon. The editing group of the
Home tab has a dropdown button named
Select.
- Click the Select button, and then click
Selection Pane...
- Press the Ctrl button on your keyboard and then click each text box in the selection pane.
- Click the Group button under the
Format tab. This will group all the objects together.
- As soon as you have all objects grouped on each page, save the document under a new name.
Save the document in the .RTF file format
The steps provided work for both Word 2007 and Word 2010:
- After you open the recovered document, click
File and select
Save (for Word 2007 click the Office button and select
Save As)
- In the Save As dialog box, click "Save as type:" dropdown and select
Rich Text format (*.rtf).
- Click Save.
Click to view this blog for more information about this issue.
Tony Jolan’s Automatic Fix:
- Download http://www.wordarticles.com/temp/Rebuilder.dotm Microsoft Office Word Macro-Enabled Template (.dotm) and open it.
- Click Options button on the Security warning and select Enable this content.
- http://xfprpw.blu.livefilestore.com/y1pwRE3ELG_o830OxtH-mAomTC4zwDe5r1q2ZKqlMk47BxJ-8Gy5TE4Dh85LeEArzqfhxpIEb0d3PfmSkR5pUWZ1F_AEUd_qLug/Rebuilder_Security_Warning.PNG?psid=1
- Click the Broken Documents tab at the far right of the ribbon.
- http://xfprpw.blu.livefilestore.com/y1paXB9ScOFIzGIk3ET8QxaiIeijJh-6DE_pAWEqCdD_fiW-5Hp5tTdKf4N7AB5GzO2uZ0jPk_Ig1ttMh8Plx0moG8MuKsk-cMN/Rebuilder_Broken_Documents.PNG?psid=1
- Click the Rebuild button in the left-hand side
- http://xfprpw.blu.livefilestore.com/y1p_zbO6cnAMo2zsd_muwehEZ1m94zD3OamnwKrkIE4q6_PSeYtptT8OrJGiSd6hcYo2qalpsjuntorEIIJ-lCgOb_Y7uBCyEdw/Rebuilder_Rebuild.png?psid=1
- Locate and open your corrupt document in the file open dialog.
That's it. The process will repair your document if possible and create a new document with *(Rebuilt)*appended to the filename. Be patient as it may take a few minutes. If a repair is not possible, you can then post to a public file area and someone here can attempt a manual repair.
Manual Fix
Notepad ++ is a good, free editor for this type of task
·
Make a copy of the file
·
Rename the copy from DOCX to ZIP
·
Open … .ZIP/word/document.xml in notepad
·
Copy the contents of the file to clipboard
·
Open Word
·
Paste a copy of the copied XML into Word
·
(optional) the XML is one long string too hard to read, you can replace some tags, with that tag plus a para mark to break up the text to make it more people readable.
·
Open an XML validator, ie this site on the internet: http://www.w3schools.com/xml/xml_validator.asp
·
Paste another copy of the XML into the “Syntax Check Your XML” input window
·
Click on “validate” button
·
Copy the missing tag, ie </mc:Fallback>
(yours will be different)
·
Return to word Find: mc:Fallback> (without the </ so you find both open and closing tags).
Repeat find until you hit 2 open tags in a row. Then you just have to figure out where to put the closing tag between them.
Look for other tags before and after a proper closing tag so you can match the problem area to a good area.