Microsoft Office

Office Gone Wild? You May Not Have Lost That File After All

Joshua Trupin


At a Glance:

  • Recovering lost documents and spreadsheets
  • Fixing broken Outlook Personal Folder files
  • Saving slides from a damaged PowerPoint deck
  • Making an Access table better

Office 2003

If you’re working in desktop support, you probably get the call on a weekly basis. One of your users was just putting the finishing touches on a major presentation, they went to save their file, and it’s gone. Where’s my file? How can this be happening? Will you guard my stapler after I’m fired for this?

The first step in supporting your distraught user is to use soothing, reassuring tones. All is not lost. There’s a pretty good chance I can help you out. Of course, once you say something like this, you’ll need to back it up with some results. Fortunately, Microsoft Office lends itself to a number of emergency data recovery procedures that can often save important business data that your users thought was lost forever. Some of these tasks do involve changes to the registry through, so make sure you know what you’re doing.

Microsoft Excel

"I can't save my spreadsheet."

Troubleshooting errors when you try to save a file from Microsoft® Excel® can be a tricky process. You have to determine whether the problem lies in the storage location, the file, or Excel itself. First, try to save the file to a different location—another hard drive or a network share. If that solves the problem, then there’s something going on locally—maybe the drive is full, a network connection dropped, or the user doesn’t have permissions for that drive. It can even be antivirus software interfering with the process Excel uses to save files.

If this process doesn’t work, then you need to determine whether it’s the drive or the file that is causing problems. This is a simple one to track down. In Excel, simply open a new, blank file and try to save it to the drive in question. If that works, the problem probably is not the drive! You could have a file-sharing conflict, or maybe the file name is too long.

If you can save a new file but not an existing one, your antivirus program may be the hidden culprit. You might be able to save your data by:

  1. Creating a randomly named temp file in the destination folder.
  2. Writing the entire workbook to this temp file.
  3. Deleting the original file (if this is a new save of an existing file).
  4. Renaming the temp file that you specified.

It’s a process that, in theory, makes sure there’s always a good copy of your data on disk. However, a zealous antivirus program can sneak in and cause problems by locking the temp file for scanning just before Excel tries to rename it. If that happens, you can encounter an unexpected file-locking problem.

If you continue to have problems saving from Excel, you can try to save the data temporarily. Try to create a new workbook and cut-and-paste your worksheets into it. You’ll have the data saved and you can then investigate what’s wrong with the original file. If this works, you can close Excel and restart it in Safe Mode to make sure there’s not an unexpected problem with a third-party add-in. Run Excel from the Start menu by Ctrl+clicking it instead of just clicking, and you’ll get the Safe Mode option.

For more information: How to troubleshoot errors when you save Excel files

"My spreadsheet is broken or something, like it’s full of garbage. And Excel froze."

If the user is working in Excel when it suddenly appears to freeze up, tell them to STOP. Step away from the keyboard. Don’t touch anything. Don’t close Excel.

The very first thing they should do is run the Microsoft Office Application Recovery tool. Only some administrators (and very few end users) know that this exists, but it can save your bacon in an emergency. It’s located at Start | All Programs | Microsoft Office | Microsoft Office Tools | Microsoft Office Application Recovery. If Excel freezes, your first step should be to run this application, choose Microsoft Office Excel from the application list, and click the Recover Application button. (Do not, under any circumstances, click End Application. No no no!)

Next, run Excel again. The recovery tool should have invoked an AutoRecover, which may have saved the user’s current data.

But what if a spreadsheet is damaged when it’s first opened? Excel 2002 and Excel 2003 support the Open and Repair command to attempt recovery of the most recent changes in an Excel file that’s been dropped on the floor or otherwise broken. Like the Application Recovery tool, most people never notice that the standard file dialog’s Open button has a little arrow on it. Click this arrow and you’ll get to choose from several file options, including Open and Repair. Choose this, then click Repair. Excel will either repair your file or, failing that, try to extract the data so you don’t lose it. Click the Extract Data button and choose between converting formulas to values or recovering the formulas themselves.

There are other techniques you can use on broken Excel files, such as trying to save your data as an HTML or XML file.

For more information: How to recover data from damaged workbooks in Excel 2002 and Excel 2003.

"I turned my machine off and forgot to save the budget!"

This one’s always a favorite. Fortunately, Excel supports a robust AutoRecover function, replacing the AutoSave add-in that was used prior to Excel 2002. When AutoRecover is turned on, it first saves the file after the user makes a change to the file, the save time interval passes, and Excel has then been idle for some period (usually 30 seconds). This process will be repeated every time the user makes another change to the file. If you want to change the delay value from 30 seconds, you can stash a new value in a user’s registry. For Excel 2003, go to this registry node:


Add a key called AutoRecoverDelay, and give it a DWORD value between 1 and 600. The process is the same for Excel 2002, except that the key goes under 10.0 instead of 11.0. This setting is per-user, not per-machine.

AutoRecover files are removed whenever Excel is satisfied that the file has been properly saved or closed (even if you don’t save it). If all goes well, you’re almost guaranteed to have a recoverable version of an unsaved workbook.

For more information: Description of the AutoRecover functions in Excel 2002 and in Excel 2003.

Microsoft Word

"I know I put that document on my drive, but now it’s just not there."

OK, sometimes users get confused. This is why you’re there—you know how to search their drive for a file name without giggling. But what happens when that doesn’t work? The file really isn’t there? If you’ve set up the user’s machine properly, you have several additional options for helping them out.


If Word has been set up on the user’s computer with the Always create backup copy option checked (click Tools | Options, then go to the Save tab), you might be able to locate a backup file. Look for any file with a .wbk extension. The full file name would be "Backup of missing file name.wbk".

No backup? You can try forcing an AutoRecover. When you select the "Save AutoRecover info every" option in Word, you will cause Word to create an AutoRecover file that includes the latest document changes. If this doesn’t work, you can still search the computer for any .asd files and attempt to open them with Word.

If none of this does the trick, it’s time to turn to the temporary files. Using the Windows Search feature (Start | Search), look for all *.tmp files. When the search is complete, sort the list in date order and look for a file that would’ve been created at the approximate time the Word file was last opened. If that doesn’t work, try the search again, but look for all tilde-prefixed files (~*.*).

For more information: How to recover a lost file in Word 2003.

"I was just about to save my report in Word when we got that power spike."

Like Excel, Word provides an AutoRecover feature. Word has included this feature for longer than Excel has, meaning you can recover files from Word 6.x through Word 2003.

Word will place AutoRecover files in a computer’s temp directory. (If you don’t know where this is, the fastest method to find out is to open up Command Prompt and run the command SET TEMP.) Auto-saved files have the extension .asd, should you ever have a need to search for them by extension. From Word 97 to Word 2003, the file name will be "AutoRecovery save of document name.asd". For Word 6.x and Word 7.x, it will be ~Wraxxxx.asd, where xxxx is a random number.

For more information: How Word creates and recovers the AutoRecover files.

"This file is really screwed up, and Word won’t even open it."

Very occasionally, you might have a problem with some of the information stored in a Word file. In a worst-case scenario, you may still be able to retrieve the text from a Word file (or from any other file, for that matter). Word 2002 and Word 2003 have a special file type option when you pull up the File Open dialog: Recover Text From Any File. You probably didn’t even see it in there, but it’s in the list of file types provided in the Files of type dropdown list. You can use it to open up any file—even an executable—and extract the text it contains into a Word document.


For more information: How to recover text from any files by using the "Recover Text from Any File" converter of Word 2002 and Word 2003.

Microsoft PowerPoint

"It’s telling me that my slide deck isn’t a PowerPoint presentation!"

Do other .ppt files open normally? If so, this particular slide deck is probably corrupted. It’s often easier to try pulling the data out rather than repairing the file itself. Open PowerPoint® and create a blank presentation. Next, choose Insert | Slides from Files. Click the Find Presentation tab, then select the damaged file and open it.

The best scenario here is that you’ve got all the data except for the master slide, and you’re back in business. Save this file immediately with a new name, no matter how ragged it looks.


All saved? Good. Now you can try to reapply your formatting from the damaged file. Go to the menu and choose Format | Slide Design, then click Browse at the bottom of the pane. Choose the damaged presentation and Apply it. If this works, you’ve recovered everything. If it acts up after doing this, there’s something wrong with the template you just created; use the backup copy you made and recreate the master slide.

If this doesn’t work as expected, you may have to find the temporary files associated with the presentation. PowerPoint assigns the name PPTxxxx.tmp, where xxxx is a random number. Search for PPT*.tmp files on the drive, sort them by date, and see if one of them matches the timestamp you’d expect for the damaged file. If so, you can rename this file PPTxxxx.ppt and try to open it in PowerPoint.

Sometimes a PowerPoint presentation just has a bad object embedded in a slide. Try opening the file on another computer, from another disk, or in PowerPoint Viewer to see if everything looks good. If you can open it on another computer, flip through the slides and delete any blank object placeholders, then resave the file.

For more information: How to troubleshoot damaged presentations in PowerPoint 2003 and in PowerPoint 2002.

Microsoft Outlook

"All my e-mail from last week is gone."

This is usually not a problem if the person is working off the server. However, if your users work from a .pst or .ost file, it’s possible that these can become corrupted due to factors outside the user’s control. Outlook 2002 and Outlook 2003 provide Inbox Repair Tools to help patch up a broken mail file.


Go to C:\Program Files\Common Files\System. You’ll see either an \MSMAPI or \Mapi folder. Under this, there’ll be a folder called \1033 that holds the scanpst.exe and scanost.exe applications. The file names explain what they do—they scan .pst and .ost files and attempt to repair problems with them. Specifically, scanpst.exe analyzes the .pst file directory structure and item headers. If it can recover the file, it repairs what it can. It can also try to turn any file with a .pst extension into a Personal Folders file. Make sure to tell the tool to create a backup file when you run it.

After you recover your .pst file, it will contain a series of basic folders (Inbox, Outbox, Notes, Sent Items, and so on), plus one folder called Lost And Found. Lost And Found will contain every item that the scan tool was able to save. If it’s not in there, you’re probably not getting it back. (Sorry.)

But wait! There’s still a glimmer of hope. If you made a backup when you ran scanpst.exe (and you have no reason not to have), copy this .bak file to a new file with a .pst extension. Open the profile that contains your recovered .pst file, and import the renamed backup using the Import and Export Wizard:

  1. Choose File | Import And Export.
  2. Choose the Import from another program or file option, then click Next.
  3. Select Personal Folder File (.pst), then click Next.
  4. Choose your recovered .pst file as the file to import, and select Do not import duplicates from the Options area. Click Next.
  5. You’ll get a tree of folders that exist in the .pst file. Select the top-level folder and make sure Include subfolders is checked. Select Import folders into the same folder, and select your new .pst file from the dropdown menu.

It’s not a guarantee, but it’s worth a try.

For more information: How to use the Inbox Repair Tools to recover e-mail messages in Outlook 2002 and Outlook 2003.

Microsoft OneNote

"I can’t load part of my OneNote file."

Just when you think you have a handle on every program you might possibly have to support, progress rolls on in the form of Tablet PCs. Sooner or later, you’ll get your first call from a user who can’t load a section of a OneNote® file.

Sometimes it’s easy. When OneNote 2003 can’t verify the integrity of a file you open, the fix is simple: OneNote restarts itself and fixes the file. It’s unlikely that any data has been lost, but if you find something is missing, you can select Help | Open Backup to look for backup files.

If you know a file is screwy, you can force OneNote to repair it by using the command line. Instead of running OneNote normally, you can go through Start | Run, and use the /forcerepair switch:

C:\Program Files\Microsoft Office\Office11\OneNote.exe /forcerepair

This forces the repair/restart cycle. If this doesn’t work, you might need to go one step further and recover information from a section file backup. As before, you can open the repaired section and then go to Help | Open Backup to find a pre-repair backup. Sometimes you can copy and paste information from the backup section into the original section. If the damage to the original is too deep, however, you may have to delete it and replace it with the backup section.

For more information: How to recover information in a damaged OneNote 2003 section file.

Microsoft Access

"My Access database just totally blew up."

This is a good place to tsk-tsk at your users, because they should be backing up their data regularly. However, sometimes things happen. Databases get damaged. Recovering data from an Access database is a somewhat lengthy process, but you can do it with Access 2000 through 2003.

Start by making a copy of the damaged table. Always, always, always work off a copy of a damaged file, not the original. Recreate the structure of the damaged table in a new table. Then open both the damaged table and the copy side-by-side.


Switch to the damaged table, and change to Datasheet View. Select a record or group of records by clicking the selectors to the left of each record. Copy the records, then switch to the new table and paste them in. Test the table. Keep copying from the damaged table and pasting into the new table with small groups of records. When you receive an error message, skip those records and continue copying the others.

When you’re down to only corrupted records, you’ll have to re-enter these by hand in the new table. Once all records have been moved, create a new Access database with a new name. Import the newly created table to the new database, and quit Access. Rename the damaged database, and delete its .ldb file. Move the new database into the directory, and rename it to the old name of the damaged database.

For more information: How to recover data from a damaged database table or a corrupted database table in Access 2000, Access 2002 or Access 2003.

Joshua Trupin is the Executive Editor of MSDN Magazine and TechNet Magazine. He has written numerous articles for MSJ, MIND, and MSDN Magazine, as well as a book, HoopStats: The Basketball Abstract.

© 2008 Microsoft Corporation and CMP Media, LLC. All rights reserved; reproduction in part or in whole without permission is prohibited.