Tech Line

Repairing Corrupt Word 2007 Files

Here’s how to bring a .docx files back to life.

Chris: I recently started a new job and most of the documents that I work with are Word 2007 files. Nearly all of them open without a hitch, but there are a couple that will not open. I think they are corrupt and was wondering if there was a way that I can at least salvage some of the information in them.
--Beth

Beth, fortunately for you all hope is not lost. Normally, when Word 2007 detects a corrupt file, it will automatically try and repair it while it is opening the file. You can also force this behavior by taking the following steps:

  1. In Word 2007, click the Office button and select Open.
  2. In the Open dialog box, click on the corrupt file that you would like to open and then click the small down arrow next to the Open button. This will bring up the Open menu.
  3. In the Open menu, select "Open and Repair."

Word will now attempt to repair the corrupted file and then open it for viewing or editing. With Word 2003, a similar feature existed. When "Open and Repair" failed to resuscitate a corrupt Word .doc file, I would then try and open the file using OpenOffice, which usually did the trick. According to the OpenOffice Wiki, the Office 12 Import Filter will be available with OpenOffice 3.0. This will allow you to open Word 2007.docx files using OpenOffice. Note that there are a few hacks online that will allow you to do this today with OpenOffice running on Linux.

Here's one example: http://www.sigmundvoid.com/?p=81.

Finally, one other approach is to convert the .docx file to a .doc file using an online converter, and I have found the online Docx converter to work really well.

If you would like to convert the files using Word 2003, you can use the Office 2007 Compatibility Pack, which is documented in the article, "Open a Word 2007 document in an earlier version of Word."

While the new file formats in Office 2007 may have caused some initial compatibility issues, their open XML format will actually ease compatibility well into the future. Tighter integration with Microsoft Office and OpenOffice is just the start of what's to come.

Tech Help—Just An
E-Mail Away

Got a Windows, Exchange or virtualization question or need troubleshooting help? Or maybe you want a better explanation than provided in the manuals? Describe your dilemma in an e-mail to the MCPmag.com editors at editor@mcpmag.com; the best questions get answered in this column and garner the questioner with a nifty Redmond T-shirt.

When you send your questions, please include your full first and last name, location, certifications (if any) with your message. (If you prefer to remain anonymous, specify this in your message, but submit the requested information for verification purposes.)

Beth, recovery from backup or an earlier shadow copy is always the best alternative for dealing with a corrupt Microsoft Office file. When a backup isn't available, then recovering the file with the Open and Repair Word 2007 feature or an online .docx-to-.doc converter are your next best bets.

If anyone else has additional tips and tricks for bringing a corrupt .docx file back to life, please post them as comments to this article.

About the Author

Chris Wolf is a Microsoft MVP for Windows --Virtual Machine and is a MCSE, MCT, and CCNA. He's a Senior Analyst for Burton Group who specializes in the areas of virtualization solutions, high availability, storage and enterprise management. Chris is the author of Virtualization: From the Desktop to the Enterprise (Apress), Troubleshooting Microsoft Technologies (Addison Wesley), and a contributor to the Windows Server 2003 Deployment Kit (Microsoft Press).learningstore-20/">Troubleshooting Microsoft Technologies (Addison Wesley) and a contributor to the Windows Server 2003 Deployment Kit (Microsoft Press).

Reader Comments:

Sat, Oct 17, 2009 Carolyn dublin

Can anyone help? My word file just shut down, no warning, i had saved along the way but when i opened the file again it was the original version. tried to find an autosave version, found a ~ file. tried to open it, it was corrupt. opened it in open-office, it was just one sentance about the type of font. found a .asd file, it apparently doesn't exist anymore. is there anything else i can do? any idea why it closed in the first place?

Mon, Aug 24, 2009 Kelli Chicago, IL

I love the person who suggested downloading Open Office and opening the file from there...I was so excited when I seen my original article open up that I jumped and down screaming yes!!! Thanks so much :-)

Fri, Jul 24, 2009 Paul Pruitt Bethesda, USA

I have been working on more options to recover text for free from corrupt Office files. If you need formatting, try Open Office per the suggestion...If that doesn't work, I now have a free web service that uses three different algorithms to recover 3 versions of your text with one maybe better than another http://www.saveofficedata.com - free web service for recovering corrupt Office 2007 files. Also Open Office and non-corrupt doc and rtf, although your welcome to try corrupt doc and rtf, maybe it'll work...not sure for those 2 extensions. Also I commissioned a third solution: http://www.saveofficedata.com/hosted-files/crword_extractor.zip - new app, new engine. Not incorporated in service yet. Direct download :-). Check with your antivirus to confirm OK...These links are self serving in some ways as I get ad revenue...

Mon, Jun 22, 2009 Lynne Smith Rock Island, IL

I am trying to repair a corrupt file. I can't get beyond opening the file. I do not have a down arrow on my open button unless the open button you refer to is not in the office button. HELP!! I don't know where to go from from here.

Fri, May 29, 2009 Paul Pruitt Bethesda, MD

As I said in my first comment earlier, I have a piece of freeware off my home page, http://www.s2services.com, which will salvage the text from a corrupt Word 2007 docx format file even when Word fails at the same salvaging. It's out of beta now. Docx files are conventionally zipped collections of XML files mainly. The text is all found in one XML file, the document.xml file within the collection. My program uses an unzipper which tolerates zip corruption and then uses an algorithm that tolerates corrupt XML to extract the text from the document.xml file. From the errors Word 2007 returns it appears Word 2007 does use an unzipper that is tolerant of zip corruption but uses a module or algorithm that is intolerant of XML file corruption. This is fairly standard. XML as a medium is intolerant of file corruption. If the document.xml file is corrupt at all, Word 2007 will not salvage any text. My freeware though will return the text including the corruption. This is because it only removes the XML hypertext around the text. It does not care about XML well-formedness, whereas, Microsoft Word 2007 does seem to, just like the vast majority of XML interpreters.

Wed, Apr 15, 2009 Paul Bethesda, MD, USA

I did a hack using the Perl doc2txt script and CakeCMD that recovers the text from corrupt docx files. I added a Tk GUI. The results are being released a beta freeware on my home page http:www.s2services.com. You should be able to recover text from a lot of corrupt docx files. There are other data recovery freeware listed on my site.

Sun, Dec 7, 2008 MugooKubwa nairobi

This article just saved me hours of work and USD 95. I used Openoffice 2.4 to recover a docx file and it opened the document right away. All the tables, diagrams were intact. Thanks a bunch.

Tue, Jul 31, 2007 Trevor London

You also have the option to salvage what text you can from the XML files. I would try the options written above first though as this is last ditch stuff.
Change the extension of the file to .zip (Word 2k7 'zips' files when saving.) You can then open it and see the contents - you may be able to save the text of the document this way.

Add Your Comment Now:

Your Name:(optional)
Your Email:(optional)
Your Location:(optional)
Comment:
Please type the letters/numbers you see above