This is a sad story with a happy end. I believe a lot of people met the same problem as I have but went to a sad end eventually. Thus, I decide to spend half an hour to write about how I solve this annoying problem to help those people who are desperate to recover their valuable documents.
Sometimes, a very very common operation in the famous Microsoft Office Word software may cause a very serious crash just like the following pic shows. Forgive me some of the information is displayed in Chinese. But you do not have to understand them. They tell only one thing: you are in big trouble now.
People usually search the problem in Google and found some solutions like downloading a microsoft fixing tool which is called MicrosoftFixit.wordopenclosetag.Run.exe. Install and run it to fix the document. Maybe the tool can fix some issues, except mine. I realized that after numerous useless tries (that is why I hate Microsoft’s all kinds of tools and patches). So if you try it once and it doesnot work. Drop it instantly and do not waste time on the tool. Try the method introduced by this article.
Ok. No more nosenses. Let’s begin.
First, backup your crashed document. Even through it cannot be opened, it doesn’t mean the content in it is gone. They are still there. So please be very cautious. Don’t lose temper and delete it. Calm down. Make a copy and put it aside. Then rename the suffix of the document from .docx to .rar.
Then, upzip the .rar to a folder. You will see the actual construction of the mysterious word file. It includes three folders (_rels, docProps, and word) and a file ([Content_Types].xml).
Enter into the word folder.
Open the file document.xml by a text editor. I suggest Notepad++. You can use your favorite editor. But the editor is required to be able to render XML with different colors and highlight the XML structures.
The content of the document.xml is very large and only has two lines. In order to check the problems in the XML, we need to reformat it first. The tool I used for reformating is Eclipse Indigo IDE which is open source and free to download. Create a Java project in Eclipse and create a new file named text.xml. Copy all the content of document.xml into test.xml.
In Eclipse, right click in text.xml. Choose “source” and Click “format”. The XML will be formated into a very friendly style. Copy the formated content back to the document.xml and save document.xml.
Next step is to locate where the error is. Zip all the three folders and files back into a .zip file. Important notice here. The folders and file must be on the first level in the zip file. So the correct way to create the zip file is shown in the following figures.
Select the three folder and the file. Right click on them and click “Add to archive”. A window like Fig. 8 shows up.
Select ZIP and click OK. Rename the suffix of the zip file from .zip back to .docx. Open it with word. An error box (Fig. 9) pops up. Click “details” and you will see the location of the error.
See, it says the error is in row 37507 column 8, So get back to the document.xml in Notepad++. Locate there and observe. Here there is some tricks to quickly find the error. Fold the XML tags around the error locations by clicking the plus symbol on the left margin of Notepad++. Other editors might have similar symbols. If not, download Notepad++ which is also free to use.
After I fold several tags, I found the problem. I found the tag <mc:Fallback> on line 37307 and the tag <m:r> on line 36335 have no end tags (Fig. 10). So I need to close the two tags. I can use the other complete tags as example and use the same pattern to fill up the missing end tags. In Fig.11 the complete content closing tag <mc:Fallback> is:
However, in Fig. 10 only the first part appears on line 37307:
So, we add the missed second part to make it complete.
It seems good. Let’s see if it works. Save the modified document.xml and repeat the step zipping the folders and file back to word docx.
Bingo! It is back! My work is back!!!
Well, let’s conclude the whole process. The most difficult part is finding the missed end tags. Don’t lose your faith. Keep patient. You will find the error eventually. It is even easier than a cross word game. Remember usually the missing tags are all together. It is almost impossible that more than one place is crashed at the same time. Try to find the only place. If one place is fixed, all is fixed. Good luck!
P S. Although this approach depends on nobody and no help which may cost your money, it takes your time, maybe an hour, maybe two hours. To avoid this, be reminded to always backup your important document with version number.