Category Archives: MIcrosoft Word
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:
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.