Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

On determining that $word is undefined you should print the value of Win32::OLE->LastError() - something like:

if (! $word ) { die Win32::OLE->LastError(),"\n"; }
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.)

/J\


In reply to Re: Win32::OLE create object failing by gellyfish
in thread Win32::OLE create object failing by esr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-19 23:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found