Process (Monitor) of Elimination
Posted by William Diaz on December 2, 2010
The problem presented itself as thus: “Microsoft Visual Basic … Run-time error ‘-2147024894 (800700002)’: Automation Error . The system cannot find the file specified.”
This happened whenever Word started, regardless of the profile being used, so I knew that I was not dealing with a Windows profile problem but a system one. And since the user is dealing with a VB error when Word starts, I can assume that the error was related to one of the many startup templates for the company located in located in C:\Program Files\Microsoft Office\OFFICE11\STARTUP:
To figure out which template was to blame, I started by process of elimination. To do this, simply create a temp folder in the above location and cut and paste one template at a time to the new folder, starting Word each time afterwards until the error disappears. A few restarts later, the error went away after moving CustPrint.dot. Upon isolating the problem template, the next step was to find out why. Some quick troubleshooting steps taken here were to verify the date and size of the template with a working one and/or replace. But neither of these corrected the issue.
To further isolate, I would need to get a trace log of the Word operations involved in running this template. For this, I turned to Process Monitor. The problem template has a custom button associated with it in the Word toolbar and clicking it is also enough to reproduce the error above. To keep the trace small, I opened Word before I started capturing, opened Process Monitor, set a filter for Winword.exe, clicked the Custom Print button to reproduce the error, and stopped the trace.
The trace was still fairly beefy with 3000+ operations recorded, so I would need to filter out some operations. I looked at Results and there were only two types in the trace, SUCCESS and NAME NOT FOUND. I am only interested in the ones that result in an operation other than SUCCESS. Now, it should be noted that it is perfectly normal to see NAME NOT FOUND hundreds or thousands of times in any operation, and it can be quite difficult (or impossible) to determine which operation is actually the one that needs to be focused on without knowing what you are looking for. In the case here, that would not be that difficult; after filtering for registry operations only and result of NAME NOT FOUND there were only 176 hits. I started my scan from bottom to top and found this operation interesting because it contained key words like Office, Word, and Addins:
To see if this missing key was normal, I checked this against my registry and saw the key existed on my workstation. I verified against another workstation and also saw the key was present.
I exported my key and copied to the affected workstation. After importing, I opened Word and error did not come back. To verify, I deleted this key on my workstation and was able to recreate the error.
Repair Office To Fix Issues With Internet Explorer « Windows Explored said
[…] a repair has only corrected an issue once ( or maybe twice). In our case, it’s the nature of the custom environment that is chock-full-o-add-ins. Other times it is some weird, unexplained element of a […]
Some PDF Internals « Windows Explored said
[…] what you are looking for is sometimes enough to narrow down why your application is failing. In a previous post, I demonstrated this approach. Here is another […]