Find the Help You Need!


Google
 

Wednesday, October 26, 2005

How to Clean Word (Copy)

Note: I have updated this post (new post also found here), but keep this page alive for the benefit of all the archived links out there.

Word is a pack rat. If it doesn’t close properly, or if you forget to do the voodoo dance of existential symmetric closure while creating your styles, or just use it how the average normal person would use it, Word will eventually have a problem due to its attic full of treasures. Here’s how you clean Word out and reset it back to defaults!

There are several things to do to clean out Word. It involves removing the standard setting entries and temp files. In order for these things to work completely, you should complete all of the steps before opening Word. Also make sure that Word is closed at the time, too.

Step 1: Clean out the temp files:

Word makes a lot of temp files for itself. Temp files can cause ownership problems (“This document is already opened by… Do you want to open a read-only copy?”) and can cause the truly paranoid perceived security leaks. It’s a good idea to whack them all if Word is closed and if you’re not trying to recover a lost document. Here are the steps to get rid of them:

  1. Click Start > Search (or Find > Files and Folders for 9x)
  2. Search for files named ~*
  3. NOTE: Make sure you’re looking in all files and folders and in hidden and system folders!
  4. Once the search is complete, select them all and delete them
  5. Close the search search window
If you see any ~$ files (called "owner files") are actually okay when Word is open, but you should never see them when it’s closed. So if you find any when Word is closed, feel free to delete away! You won't lose one scrap of data from your document, I promise.

Step 2: Clean out the registry settings:

Word stores its settings in the registry as many Windows applications do. However, it’s possible for these entries to get whacked somehow. Since the registry itself doesn’t magically go bad, it’s the application’s fault (or that of a virus) – it probably wrote incorrect/wrong data to a registry key. Possible symptoms of this include missing toolbars, or other UI problems.
  1. Click Start > Run
  2. Type ‘regedit’ (without the ') and hit Enter or Click OK
  3. Browsing the list of folders on the left, go to the following location:
    HKey_Current_User > Software > Microsoft > Office > Word

    This key stores your basic settings UI and feature settings.

  4. Rename the Data and Options keys on the left to something like oldData and oldOptions; the name is unimportant, as long as it's not Data and Options
  5. Close the Registry Editor
NOTE: Renaming/deleting any key from the Office key or below will be recreated once you start an Office application (like Word). This is a resiliency feature built into Office to help keep things stable. But, alas, don’t try this on other applications as they probably won’t do the same!

Step 3: Clean out the startup folders:

Word uses two startup folders. One is specific to Word (and the user profile on 2000/XP) and the other general to Office. Here's where to find them:
  1. Go to C:Documents and Settings<profile>Application DataMicrosoftWordSTARTUP NOTE: Application Data is a hidden folder. Turn these on in Tools > Folder Options > View tab > Advanced settings if you need to. Also, this folder is specific to Word and the user Profile.

  2. Remove everything from this folder
  3. Now, browse to C:Program FilesMicrosoft OfficeOFFICE<12, 11, 10, 9>STARTUP

    NOTE:
    This folder is general to Office, so removing things from here may impact 3rd party functionality in other Office applications. But, remove this stuff if you’re troubleshooting.
If you just can’t find the startup folders for one reason or another, then do a search for any file or folder named “startup” and check them all. You don't have to delete the files there, you could just move them to your desktop for testing. If you're convinced you don't need them, then you get throw them away. Do what you gotta do!

Step 4: Clean out the addins:

There are several places from which addins can sink their teeth into Word. You’ve got startup folders (most common), COM addins and template addins (which can be located just about anywhere) and actual Windows applications (such as Norton AV’s officeav.dll, or other 3rd party .wll libraries).

NOTE: if you’re troubleshooting a problem in Word, it’s a good idea to open Word with the /a option. That way, you can check “Templates and Addins” and “COM Addins” without having Word undo anything that you’ve done this far. To use /a, go to Start > Run > type “winword /a” (without the quotes) > click OK or hit Enter.

Template addins:
  1. Open Word and go to Tools > Templates and Addins

    This will display a list of template addins. Most will not be present as they are usually loaded from the startup folders. Uncheck any files listed here. You can always go back and enable them if you discover that you need them.
COM addins:
  1. Open Word and go to Tools > Customize > Commands tab
  2. In the Categories section on the left, choose Tools
  3. In the Commands column on the right, you’ll see “COM Addins…”
  4. Grab this COM Addins… button and drag it up and drop it off on your toolbar somewhere. It doesn’t matter where – you’ll delete it in a minute anyway

    NOTE: The quick way to delete this button (or to customize the toolbar) is to hold down Alt and click and drag the button into the document. When you let go, it’ll disappear!

  5. Close the Customize dialog
  6. Now, click the new COM Addins… button on your toolbar

    Like the Templates and Addins dialog, you can enable or disable whatever you see here. Remove the button if you like, or keep it there for nostalgic purposes.
The Registry:
  1. Click Start > Run
  2. Type ‘regedit’ (without the ‘) and hit Enter or Click OK
  3. Browsing the list of folders on the left, go to the following location:
    HKey_Current_User > Software > Microsoft > Office > Word > Addins

    This key has addins listed in it – sort of. Usually they are the COM addins listed, but it may contain other references, hooks, claws and leftover teeth from a hungry addin.

  4. Rename the Addin key and close the Registry Editor.

Now, other addins… Well, it’s hard to know if you have another program interfacing with Word. The most common ways to enhance Word are listed above. The only other addin that I’ve had experience with is Norton’s officeav.dll. Microsoft recommends that you use Norton’s interface to disable it. However, if you’re smart enough to know how to use regsrv, you can always disable it by unregistering the .dll.

Step 5: Clean out the normal.dot template:

The mysterious Normal.dot. I’ve seen this thing cause problems like crashing Word, slow printing, propagating corrupt documents and a whole slew of other things. This is the epitome of pack rat-ness in Word. The Normal.dot is what Word uses to create a new blank document. So, you can see that if your Normal.dot is bad, so is every document that you create from the time that it goes bad.

If you like to harbor custom toolbars, styles, autocorrect entries or macros in your Normal.dot, then it’s a good idea to keep a backup or two. However, IMHO, you should always dump these kind of things into an addin template and keep normal.dot clean. You can always use the organizer to move your old macros into your new Normal.dot.

  1. Go to C:Documents and Settings > profile > Application Data > Microsoft > Templates

    NOTE: This folder is profile specific. If multiple people use your computer, you could have one work and the other not.

  2. Rename this file or move it to another directory
  3. Delete any ~$ files that you might see (should have been removed in Step 1)
So, how do you know if it’s bad? You usually don’t - until it’s too late. One key indicator is size. The default size of normal.dot is about 27 KB. I’ve seen them as big as 20 MB – and that’s a big problem!

Step 6: Open up Word

Now, fire up Word any way you like it. If you’ve done everything listed here, you’ll probably be prompted for your user name initials and organization, just like when you first opened it after your first install. You should notice that everything is quite clean and back to defaults.

Step 7: Repair Word (optional)

This step is optional because it may or may not require your disk. It also does NOT fix problems caused by items fixed in this article. However, it does (read: should) fix application errors. Here's what to do:
  1. Click on Help > Detect and Repair
  2. Select “Repair My Shortcuts While Repairing” and (if available) “Discard my customized settings and restore default settings
  3. Click OK

Additional reading and references:

A description of what winword /a does:
http://support.microsoft.com/default.aspx?scid=kb;en-us;826857

A description of Word's startup switches:
http://support.microsoft.com/default.aspx?scid=kb;en-us;210565

How to troubleshoot Word startup problems:
http://support.microsoft.com/default.aspx?scid=kb;en-us;820919

3 comments:

rh3662 said...

Also check that the TEMP and TMP environment variables haven't been deleted and/or are set to a location the user has rights to. I had a user (with normal user rights) delete both variables which caused this error in Word.

Sam Williams said...

The normal.dot file size tip was right on. Word would error on open and then crash, until I deleted the 1.5mb normal.dot file. Now it's working great!

walloon.be said...

The winword /a was working for me !
Thank you from Belgium :)