Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Troubleshooting corrupted MS Office files

How to

Troubleshooting corrupted MS Office files

by  jrbarnett  Posted    (Edited  )
Troubleshooting corrupted MS Office files

Occasionally, MS Office files may corrupt when saving, preventing them from opening normally. This document goes through some steps that you can use to try and regain access to the data held within the file, together with caveats that may apply at a particular stage. Should anything not work after this, then and only then it may be worth approaching professional data recovery companies depending on the value of the data to you.

They are sorted in order of likelihood of being able to recover the data in as close a form to the original as is likely, including retention of formatting, styles, calculations and items such as VBA code modules etc.

Equally, it is true that some options will not be available to everybody - if you work in a locked down corporate environment then you will probably not be able to download and install software on your PC, likewise if you are a small business owner with only one PC/laptop then there may not be another computer to hand to try opening it on there.

I refer here to a "document" as what you want to recover, but realistically it refers to documents, spreadsheet or presentations that you wish to try and recover.
This FAQ concentrates on the main Windows applications of Word, Excel and Powerpoint, but I have put a section at the end relating to other MS Office family applications where details are known.
Additionally, similar techniques may work for Apple Macintosh equivalent versions. Although have no experience of the Mac equivalents, I would assume similar facilities will be present within the applications would work.

This FAQ is a combination of data gained from reading other FAQ's on this site, web searches and personal experience in recovery of a number of documents and is known correct as of September 2011. It is not purely the work of one person, the although my name appears at the head of this FAQ, other people also deserve credit where it is due.

Considerations for modifying file contents
Some of the steps below involve making changes to the content of files. Please take a copy of the original at the state it is before starting your work, in case anything that is done ends up making the situation worse.

Restore Backup
If you have a recent good backup of this file, restoring this will be by far the quickest way to regain access to your data. The stages below should only really be considered if this is not available.

Stage 1: Try to open the document on another computer.
If you have another computer available to you, by far the simplest is to try opening your problematic document on another computer - if this happens then the problem is down to something on the first computer - either a corrupted application installation, addin or template.

If this is the case, reinstallation of the Office application is probably the best way to go.

Stage 2: Hold down the shift key as you open the document.
Open Word, Excel or Powerpoint in your usual way. From within the application, use File Open and then select the file, and hold down the shift key as you click OK on the file open box, but don't double click the document. Hold down the shift key as you open the document and hold down shift key as you open to bypass any startup macros present in the document.

Sometimes this is enough and you can save the document under a new name and all is well. However, if not, move onto the next stage, which takes this one step further.

Stage 3: Run the application in safe mode
Many Office applications have a "safe mode" in which they will not run startup code, templates and addins. This can sometimes be enough because less is running that will cause problems.

As examples of how to do this:
Command line switches for Word - http://support.microsoft.com/kb/210565
Command line switches for Excel - http://support.microsoft.com/kb/291288

there are equivalents for others available.

Stage 4: Open the document in a newer version of the application than you are using at present.
If your Microsoft Office installation isn't fully patched, I would suggest using Microsoft Update to update your installation with the latest service packs and patches and start again.

Data recovery tends to improve with newer versions and this can sometimes access the files. Therefore, it may be worth trying a trial version of the latest version and seeing if this can open the file.

Microsoft Update - http://www.update.microsoft.com

Stage 5: Try Word/Excel/Powerpoint Viewer (or if Word, Wordpad)
Microsoft produce viewer applications for people who do not have licensed MS Office installations. These are available for free from the Microsoft website and are worth trying:

How to obtain the latest Word Viewer - http://support.microsoft.com/kb/891090
How to obtain the latest Excel Viewer - http://support.microsoft.com/kb/913879
Powerpoint Viewer - http://www.microsoft.com/download/en/details.aspx?id=13

Using a viewer application although you won't be able to save any modifications, you should be able to open the file and view its content and print it out.

For Word documents without heavy formatting, it is also worth trying Wordpad that comes with Windows, this may give you some of the data back. If you have access, it is also worth trying Office 365, their online cloud offering or uploading to SkyDrive and trying from there.

Stage 6: Try opening the file in a non Microsoft application
Many competing applications have the ability to open Microsoft format files and convert them to their own native format. It is worth trying to use these to see if access can be gained (even if a trial of a commercial product). Such products include LibreOffice (earlier versions were known as OpenOffice) and Corel Office. This also applies to viewer applications on PDA's, smartphones and non Microsoft cloud computing facilities such as Google Docs etc.

LibreOffice - http://www.libreoffice.org
Corel WordPerfect Office - see from http://www.corel.com

Use Word's Recover Text from Any File feature
Word has a feature to recover text from any file that it has tried. This will make an attempt at accessing text in a binary format file. For instructions on using it see http://support.microsoft.com/kb/290946

Open the file in a text editor
As a last resort, it is worth trying to open the file in a text editor (such as Notepad) to see if the text content can be copied out and pasted into a new document. However, this will lose all the formatting.

A trick here with the newer Office 2007/2010 file formats (.docx, pptx, xlsx etc) is that the files are compressed zip format files. Use Windows to show the file extensions, take a copy of the file, rename the extension to .zip, acknowledge the operating system warning, right click and use Windows compressed folders to extract the content. You can then access the individual components of text, images etc and easily paste it into a new document.

Data recovery and other Microsoft Office family applications:
I only have real experience in recovering data in Word, Excel and Powerpoint formats. However, the MS Office application family extends well beyond this. Here I outline the possibilities of recovery or access to data for other applications that I have found.

* Access
Try opening the file in exclusive mode first of all. Second attempt is to compact and repair a copy of the file (not the original) and try and open the copy.

How to open an Access database or project read only: http://office.microsoft.com/en-us/access-help/making-an-access-database-or-project-read-only-HA001034539.aspx
How to compact and repair an Access database: http://office.microsoft.com/en-us/access-help/compact-and-repair-an-access-file-HP005187449.aspx

If these fail, the latest versions of the Kexi Project supports importing of schema and data from Microsoft Access, but not forms, reports, macros, VBA etc. LibreOffice supports linking to live schema and data from within an Access database but no access to macros, forms, reports etc.

Kexi Project - http://kexi-project.org/
LibreOffice - http://www.libreoffice.org/

There is no Access viewer per se, but Microsoft offers a runtime version freely available from http://www.microsoft.com/download/en/details.aspx?id=10910
This is designed for deployment of an application preventing access to its design and source code, however I include it here for the sake of completeness if the application's data entry/update and reporting features are sufficient for your needs. The chances are, however, if a full access version with a compact and repair can't open it, the runtime won't be able to either.

* InfoPath
Microsoft do not provide a free viewer application, but third party commercial offerings exist.

* Outlook PST (Personal Folders) files
First stance is to take a copy of the PST file and try the Outlook Inbox repair tool.
How to start and run the Inbox repair tool: http://support.microsoft.com/kb/272227
How to use the Inbox Repair tool to recover email messages: http://support.microsoft.com/kb/287497

Third party email applications often have the ability to import PST files and it may be worth trying them out. I cannot comment on how well they work.

* OneNote
There is no specific viewer available or ability to import the data into other applications, but there is a trial version available from the Microsoft web site.

* Project
Microsoft does not offer a free viewer available, but there are a few third party viewing tools. I have not tried them so cannot vouch for their reliability.

* Publisher
From extensive research, there does not appear to be a viewer available for Publisher files or third party applications available that have the ability to import them.

* Visio
Microsoft offers a free viewer available for Visio http://www.microsoft.com/download/en/details.aspx?id=21701

General
Summary of Microsoft Office Convertors and Viewers - http://office.microsoft.com/en-us/downloads/office-online-file-converters-and-viewers-HA001044981.aspx

Acknowledgements
Thanks to Annihilannic and strongm for proof reading/type checking this FAQ document and helpful suggestions to improve its accuracy and usefulness.
Further suggestions/corrections are welcome, please use the Tek-tips FAQ comment feature to send them to me for consideration.

Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top