|Just another Perl shrine|
Win32::OLE create object failingby esr (Scribe)
|on Sep 10, 2006 at 00:59 UTC||Need Help??|
esr has asked for the
wisdom of the Perl Monks concerning the following question:
I have several perl programs which have been running successfully for some time on WinXP using WIN32::OLE, using the interface for both Excel and Word. These programs run on both of our home machines. Recently I started having problems creating the object for Word but only on one of the machines, not the other. The following snippet has worked correctly in the past and still works on the other machine but for some reason it is not returning the object reference.
The Open fails because $word is not defined. Similar code for Excel still works fine.
The boilerplate at the beginning of the program contains:
It appears that something has changed on this machine but I don't know what to look for. I recently had some problems with my virus checking program for which the "fix" caused some registry problems for I.E. but AFAIK fixing those did not affect anything else.
I have also tried using CreateObject and GetObject but they do not return an object reference either. Is there something in the OLE stuff that gets registered that may have gotten unregistered? Any ideas of what I should look for?
Addendum: When I set Win32::OLE::Warn=2 I get the error message that I have an "Invalid Class String".