Microsoft Visual C++ Runtime Library. Runtime Error!
-
Whenever I open a Word document email attachment the document opens but is immediately followed by this message: “Microsoft Visual C++ Runtime Library. Runtime Error! Program – C:\Program Files\Microsoft Office\Office 10\WINWORD.EXE”. Clicking OK closes Word and the document. The computer is running Windows XP with Office 2002.
It is interesting that you mention the problem is only caused when you open a Word document email attachment. It would be interesting to know whether there are any problems when opening Word through the normal Start menu shortcut or when double-clicking to open a document located on the hard drive of your computer. In any case, most of the suggestions which can resolve the problem are not specific to one or the other so we can apply them equally to the situation where the problem only occurs when you open an email attachment versus the problem occurring every time you open Word using any method. You will be glad to know that this problem is not rare and many other users have encountered the issue. The most common cause relates to add-ons being installed in Word which disagree or conflict with the application, resulting in the crash on startup. In the first instance we will try disabling COM add-ons which may be loading with Word. COM add ons are known as Common Object Model add-ons. While you don’t need to be concerned about the specifics or semantics of this type of add-on, it is essentially a component which can be loaded by Word to provide additional functions. To begin the procedure, open Word. If you are unable to open Word (because the error occurs when opening Word normally and is not just limited to opening a Word email attachment) then go to the “Start” menu > “Run” and type “winword /a” (without the quotes) and click OK. This will open Word but prevent any add-ons from being loaded, hopefully allowing you to open Word successfully so that you can disable the problematic add-on. Be aware, if Word does not successfully open when using the /a switch then the problem is not related to an add-on so you can skip the rest of this procedure and move onto the next suggestion.
Once you have opened Word you will need to add the COM Add-Ins button to the toolbar which will enable you to access the add-ins (or add-ons, the terms mean the same thing for the purpose of our discussion) configuration. Go to the “Tools” menu > “Customize”. In the Customize window that appears, click “Commands” and in the list of “Categories” click “Tools”. From the “Commands” list, drag the “COM Add-Ins” to one of the toolbars then close the Customize window. Now in the Word toolbars you should see the new COM Add-Ins button. Click this button and the COM Add-Ins window will appear, listing all of the COM Add-Ins within Word. If there are items listed and ticked it means that those Add-Ins are enabled and will automatically load with Word. Potentially one of these could be causing the problem. Note down each of the enabled (ticked) add-ins and then untick all of the add-ins so that they are all disabled and none of them will load on startup. Click OK to close and save the changes. Be aware, if no add-ins were listed then obviously this is not the problem, so you can skip to the next suggested procedure instead.
Assuming that you did disable some of the add-ins, open a Word document email attachment and check whether the problem has been fixed. If Word opens successfully then one of those previously enabled add-ins was the cause of the problem. At this point it will just be a process of elimination to determine the item triggering the problem. I suggest that you re-enable the COM add-ins one at a time, each time closing Word and checking whether the problem re-occurs. When the problem does start happening again the most recently enabled add-in is the cause, so you can leave that disabled while re-enabling all the others. If that add-in isn’t providing an essential function or feature then you may just be able to leave it disabled. Alternatively, if you do need the functionality provided by that add-in then you may need to do some additional research into the problem to find a solution.
Of course, it is also possible that disabling the add-ins did not fix the problem. In this situation, before proceeding any further, you should re-enable all of the add-ins which you previously disabled so the configuration is restored to the previous state. We will now move onto the next possible cause being a different type of add-in. In addition to the COM add-ins, other add-ins can be placed within the Office Startup folder. These also include various templates which Word (and other Office applications) may use. Again, we will not go into the semantics of the differences between the various types of Office add-ins but suffice to say that this is also a real possibility for the root cause of the problem. Unfortunately, older versions of Office (such as Office 2002) do not have a particularly elegant way to disable add-ons, so we will need to take a more direct approach. As the add-ons are stored within a folder we will need to rename these add-ons so that Word does not load them on startup. Ensure that Word is closed and then go to the “Start” menu > “Run” and type “%programfiles%\Microsoft\Office\Office10\Startup\” (without the quotes). This will open the Startup folder for your installation of Office 2002. Notice that we are using the %programfiles% variable at the beginning of the path – this will simply be replaced with the actual path to your Program Files folder (such as C:\Program Files). Once you have opened the folder we need to enable the viewing of file extensions. This will allow us to rename the files contained within so that they are not recognised as add-ins or templates by Word. Go to the “Tools” menu > “Folder Options”. In the Folder Options window that appears, select the “View” tab and enable “Show file extension for known file types”. It would also be worthwhile to enable “Show hidden files and folders” (although you may wish to disable this again once you have finished troubleshooting this problem, to ensure that you don’t accidentally delete or modify important files which have been hidden to prevent modifications). Once you have updated the settings click OK to save the changes and close.
Now that you have returned to the Startup folder listing you will notice that all the files have an additional part of their name, consisting of a period (.) followed by a three letter file extension. The file extension denotes the type of file and allows Windows to determine which program should be used to open and view those files. For example, the Word Document (.doc) file extension indicates to the computer that files with the .doc extension should be opened in Word. By changing the file extension we can indicate that the file is a different type and thus should be opened using a different program. Of course, simply renaming a file does not change the type of file it is. If you change MyDocument.doc to MyDocument.xls that doesn’t change the file from a Word document to an Excel file. It will simply result in Windows attempting to open the file using Excel, which won’t work very well since Excel cannot properly read Word documents (so you will likely get an error saying the file is not a valid Excel document). However, for our purposes we are going to temporarily change the file extensions of the files located in the Startup folder so that Word does not recognise them as add-ins or templates and thus does not attempt to load them during startup.
When renaming the files with a new file extension we are going to simply append .old onto the end of each file. For example, if there is a MyTemplate.dot file in the Startup folder this will be renamed to MyTemplate.dot.old. Don’t worry about the fact that you now essentially have two file extensions on the end of the file – Windows will only honour the last file extension (in this case, .old) and will treat everything before that last file extension as just part of the normal file name (no different to having periods within a normal filename, like My.Great.Document.doc). As a result of changing the file extension to .old you may notice that the file icon changes – this is normal, as the icon is linked to the file extension (so because you have changed the file extension the icon will also change). Most likely the icon will change to a generic looking file, because the .old file extension is not associated with any programs on your computer.
Once all of the files in the Startup folder have been renamed, open a Word document email attachment in Word and check whether the problem continues. If not, one of those add-ins or templates was causing the problem. As discussed previously, it will now just be a process of elimination to determine which of the add-in or template files is causing the problem. I suggest that you remove the .old file extension from each file one-by-one (restoring them to the original file names), checking whether the problem reoccurs. Once it does, you know the add-in or template causing the problem and can either just leave that disabled or alternatively conduct further research into methods to resolve the problem, now that you have identified the specific item causing the issue.
Should the problem continue, then before proceeding further make sure that you re-enable all of the add-ins and templates by restoring the files to their original names without the added .old extension. As a final troubleshooting step you could try deleting the Normal.dot file. This file is the blank document template that appears when you start Word and create a new document. The Normal.dot template stores all of the default settings for your documents, such as default fonts, page margins, page sizes, etc. While it would be unlikely this is the case of the problem, since the problem primarily occurs when opening an existing document (from an email attachment) it would still be worthwhile trying this procedure, since a corrupt Normal.dot can cause all kinds of strange behaviour. Make sure that Word is closed and then go to the “Start” menu > “Run” and type “%userprofile%\Application Data\Microsoft\Templates\” (without the quotes). Much like the previous command we used to access the Startup folder, this will open the Templates folder. As the templates are user dependent, the %userprofile% variable will automatically be replaced with the path to your user area on the computer.
Once in the Templates folder, ensuring that both display hidden files and display file extensions are still enabled, you should see the Normal.dot file. Rename this file to Normal.dot.old (next time you open Word a fresh Normal.dot file will be created). Now, check whether the problem continues. If not, a corrupt Normal.dot file was the problem. There isn’t anything else you need to do, as you cannot easily recover a corrupt Normal.dot file (and it probably isn’t worthwhile anyway, since it doesn’t generally contain any important data except default settings). However, you will find that all your document defaults have reset to their factory settings. This means that if you changed the default font, page settings, etc. for new Word documents you will need to re-set those again. If you haven’t done any customisation then you need not worry about doing anything else. If you do find the problem continues then you will probably want to restore your original Normal.dot file. Back in the Templates folder you will find that Word has automatically created a brand new Normal.dot file. You can delete that file and then rename your original Normal.dot file (currently named Normal.dot.old) back to its original name.
If you reach this point without resolution then please contact me again for further advice. However, you may also wish to consider upgrading to a newer version of Office which could also fix the problem. Your version (Office 2002) has now been superseded three times (with the latest version being Office 2010) so it could be a good time to upgrade. Office 2010 runs on Windows XP 32-bit with Service Pack 3 installed.