0% found this document useful (0 votes)
65 views

Fixing A Broken

This document provides steps to fix a broken .docx file by editing the underlying XML files: 1. Extract the XML files from the zipped .docx file. 2. Open the XML files in a text editor that supports find and replace. Replace '<>' with '>[linebreak]<' to space out the document logically. 3. Save the edited XML files back into the zipped .docx file to fix errors shown in Word. If additional errors occur, repeat the process of finding and removing XML tags until the document opens without issues.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views

Fixing A Broken

This document provides steps to fix a broken .docx file by editing the underlying XML files: 1. Extract the XML files from the zipped .docx file. 2. Open the XML files in a text editor that supports find and replace. Replace '<>' with '>[linebreak]<' to space out the document logically. 3. Save the edited XML files back into the zipped .docx file to fix errors shown in Word. If additional errors occur, repeat the process of finding and removing XML tags until the document opens without issues.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Fixing a broken Docx file.

The quick and dirty method

You will need: Basic knowledge of XML or HTML A full featured text editor that supports multiline find&replace and search by line (EditPad Pro) A zip archival program (winzip / winrar) If a file is broken in word 2007, it will display the following dialog box

Clicking on the details section will show you where the problem is located

Word 2007 files are actually zip files containing xml files which is why it gives the location of an xml file. 1. Right click the document file and select open with -> choose program. 2. Select your zip archival program from the list.

3. Navigate to the xml file described in the error (/word/Document.xml)

4. Copy the XML file to your hard drive (keep the decompression program open) 5. Open the XML file with the full featured text editor (this guide will show EditPad) 6. Perform a search and replace for >< and replace it with >[linebreak]< This will logically space out the document

7. Save the xml document and drag it back into the archival program to replace the existing xml file. 8. Open word again and take note of the error

This error message will be much easier to find (Line 5132 Column 8)

9. Open the xml file again (the one saved locally) and navigate to the line given in the error

10. Using the line found as the beginning tag (in this case <m:sSub>) locate the end tag for this tag.

11. Delete this entire region Note: this will cause a loss of data, but will at least allow the document to open 12. Save the XML document and place back into the docx archive (as in step 7) 13. Try to open the document in word. 14. If it gives another error, repeat steps 8-13 until the document opens

You might also like