Word Hacks [Electronic resources]

Andrew Savikas

نسخه متنی -صفحه : 162/ 80
نمايش فراداده

Hack 51 Troubleshoot Common Word Problems

This hack offers a systematic approach to fixing common frustrations.

You can solve a number of common Word problems using the same systematic approach. Typical symptoms include:

Missing toolbars

Word crashes repeatedly

Word freezes right after opening

Any strange Word behavior unrelated to a particular document

There are three likely culprits: your Normal template, an add-in, or a corrupt data key in your registry. Additionally, extraneous temporary files can contribute to the problems.

If you run Word 2002 or 2003, Microsoft offers troubleshooting templates for automating most of this process. You can find these templates at:

http://support.microsoft.com/default.aspx?scid=kb;en-us;319299&Product=wd2002

http://support.microsoft.com/default.aspx?scid=kb;en-us;319299&Product=wd2003

6.2.1 Delete Any Temporary Files

Whenever you open a document, Word creates a temporary file to store various information about the file. Word usually deletes these temporary files when you close the document, but they can overstay their welcome and occasionally cause real trouble when Word or Windows crashes.

The easiest way to delete your temporary files is from Windows Explorer:

Close any open Windows applications.

Click an empty spot on the taskbar and press F3 to open the Search feature in Windows Explorer.

Make sure you look in your primary hard drive and check "include subfolders."

Type the following in the "named" box, as shown in Figure 6-1:

*.tmp;~*.do?;~*.wbk

Click the Search button.

Delete the files listed in the search results.

Figure 6-1. Searching for obsolete temporary files

Sometimes people (or programs) include a tilde (~) in filenames, usually to force a file to the top of the folder list. Before you delete all of the files returned by the search, first make sure they're really temporary files.

If the problem persists, you need to check the templates Word loads when it starts.

6.2.2 Start Word with a Clean Slate

Every time you start Word, your Normal template loads, along with any add-ins in your Startup folder. You can also tell Word to start up without loading any templates [Hack #52] :

Start Word from the StartRun menu by typing:

winword.exe /a

Now press Enter. Note the space before the /a. This starts Word without any add-ins, global templates, or Normal.dot. If that fixed the problem, continue to Step 2. Otherwise, you can skip ahead to the next section.

Close Word.

Use the Windows Find feature to locate Normal.dot:

Click an empty spot on the taskbar and press F3 to display the Search window again.

Make sure you're searching your primary hard drive and check "include subfolders."

Type Normal.dot in the "named" box and click the Search button.

Depending on your version of Windows, Normal.dot may be a hidden system folder. In Windows Explorer, select ToolsFolder options, click the View tab, and check the "Show hidden files and folders" box.

Right-click Normal.dot in the search results and rename it Normal.old.

Restart Word.

When you delete or rename your Normal.dot file, Word creates a new one based on default settings. If the problem goes away, you had a corrupt Normal template. If not, check any other templates loaded when you start Word.

6.2.3 Disable Other Global Templates and COM Add-ins

If your Normal template wasn't at fault, try your other global templates and add-ins next:

Find out what, if any, global templates and add-ins Word loads when it starts. To do so, locate your STARTUP folder (usually C:\Documents and Settings\<username>\Application Data\Microsoft\Word\STARTUP).

Move each of these out of the STARTUP folder.

Close Word and drag each add-in back into the STARTUP folder, one at a time. Open, test, and then close Word after each one. When and if the problem reappears, you will have located the add-in causing the problem.

If the problem persists, you may have a corrupt data key in your registry.

6.2.4 Delete the Word Data Key

When you delete the data key, Word rebuilds it using default settings. The data key stores many of the customizations you've made to Word, so to avoid losing those, first make a quick backup:

Go to ToolsMacroRecord New Macro (or double-click REC in the status bar) to begin recording a new macro. Name the macro RestoreOptions and save it in Normal.dot.

Go to ToolsOptions. Visit each tab in the Options dialog, and then press OK.

Stop recording.

The macro you've just recorded includes the current settings for many of the items stored in the data key and most of the items in the Options dialog. After you've recorded this macro, you're ready to delete the data key:

Back up the registry.

In Windows XP, create a system restore point by going to your Start menu and choosing AccessoriesSystem ToolsSystem Restore. To restore the registry later, go to the same place and follow the instructions under "Restore my computer to an earlier time."

In earlier versions of Windows, select StartRun and type scanregw. (Windows also automatically makes backups of the registry every time you boot up your PC; it keeps the last five backups and overwrites previous copies.) When you back up using scanregw, the file will be replaced in five days. As an alternative, you can use the "Export Registry File" option in the registry editor.

If you need to restore your registry later, follow these steps:

Select StartShut Down and click "Restart in MS-DOS mode." When in DOS, type scanreg and hit Enter. Windows will probably tell you there is nothing wrong and you don't need to restore, but you can override that.

Click View Backups and highlight the backup you wish to restore (by the time/date stamp). Then click the Restore button.

After restoring your registry, Windows will reboot into MS-DOS mode again. This time, type exit and hit Enter to return to the normal Windows mode.

Close Word. Select StartRun and type regedit to launch the registry editor. Navigate to the following key:

HKEY_CURRENT_USER\Software\Microsoft\Office\version\Word\Data

Use the following list to find your version, and then either rename or delete the Data key:

Word 97: 8.0

Word 2000: 9.0

Word 2002: 10.0

Word 2003: 11.0

Restart Word to rebuild the key using the default settings.

6.2.4.1 After you've rebuilt the data key

Restore your default options by running the RestoreOptions macro you created. Five other changes that may require your attention will also take place when you delete the data key:

Your Standard and Formatting toolbars will share one line. To correct this, select ToolsCustomize and check the "Show Standard and Formatting toolbars on two rows" box. (In Word 2000, uncheck the "Standard and Formatting toolbars share one row" box.)

The dreaded Office Assistant may reappear. To banish the Office Assistant [Hack #12], right-click it, choose Options, and uncheck the "Use the Office Assistant" box.

You will lose the list of your most recently used files on the File menu.

You will lose all the files on the Work menu.

You will need to reattach any global templates or add-ins not in your STARTUP folder.

Once you restore Word to its former state, you may want to export the data key from the registry (it shouldn't be corrupt again just yet) to a safe location on your hard drive. Then if you need to delete the data key again, you can restore it from this backup and save yourself the trouble of those last five steps.

Phil Rabichow