Link to home
Create AccountLog in
Avatar of Robert Ehinger
Robert EhingerFlag for United States of America

asked on

COM Error

I have a Windows 7 system with Microsoft Office 2007. We have a script that runs well on other systems but when run on this system I get the error in the attached screen shot. I have searched and searched for a solution from repairing Office 2007 to uninstalling it and reinstalling it, to registry edits but nothing seems to work. Any Suggestions?

Thank you!

Robert
comerror.docx
Avatar of Ken Butters
Ken Butters
Flag of United States of America image

Can you post any of the code that is causing the error?

From what I've read it sounds like there a couple of things that people have done to address this error.  

One instance occured when 2007 was uninstalled and they went back to 2003.  That left class_id's in the registry that caused issues... they had to manually go through the registry to identify this particular class and clean up the conflicting class-id's.

Another person declared success by re-installing Visual Studio 2008.

A third solution was to change the code in the script. Apparently this error occurs with the code creates an instance of microsoft Word.  There was a suggestion to change the code from Word.ApplicationClass() to Word.Application().... but w/o seeing your code it's kind of hard to tell if that is part of the issue.

I am including this page as a reference in case we need to go through the typelibs/classIds.  About halfway down the page a post by "CyberAnt" seems to have had some success with a similar error.

http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/08f13e9d-895c-4102-b6d9-e327af8cf8c0
Avatar of Robert Ehinger

ASKER

I had already tried the solution posted by cyberant and it worked for a couple of weeks but now we are right back where we were before and that solution will not work anymore.
1) Please post code (or snippet) that reproduces the error.

2) What version(s) of MS office are currently on the machine having issues?

3) Have there been other versions of office on the machine that have since been removed?
ASKER CERTIFIED SOLUTION
Avatar of Robert Ehinger
Robert Ehinger
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
None of the other suggestions were successful but this one did the trick.