in reply to Win32::OLE create object failing
On determining that $word is undefined you should print the value of Win32::OLE->LastError() - something like:
However from the warning that you are getting it does look like that all or part of the Word COM server is not registered. You can check this using the OLE Browser that comes with the Activestate Perl (or the one that comes with the Microsoft SDK if you have that,) or at a push you can compare the registry entries from a machine where this is working using regedit (i.e. search for Word.Application ). Probably the best way to repair this would be to re-install word, but you could re-register the COM server using regsrvr32 (i.e. something like regsrvr32 /i winword.exe but I don't have a windows machine to test it at the moment.)if (! $word ) { die Win32::OLE->LastError(),"\n"; }
/J\
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Win32::OLE create object failing
by esr (Scribe) on Sep 11, 2006 at 14:47 UTC |