Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^5: Automating Word with Perl

by jplindstrom (Monsignor)
on Oct 29, 2008 at 23:05 UTC ( [id://720358]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Automating Word with Perl
in thread Automating Word with Perl

Win32::Word::Writer is a wrapper around Win32::OLE, using the ActiveX Word API.

For the things that Word::Writer doesn't do out of the box, you need to do it "manually" using regular Win32::OLE Automation methods on the Word object model. The Word instance and the Word Document are both available.

I recommend that you start by looking at Visual Basic (VBA) examples for how to do automate things in Word in general (Google it), then read the Win32::OLE docs to see how it's translated to Perl (it's different, but very similar). Then browse through the Word Document Object Model (here's how).

As mentioned, "A good way to figure out how to do something is to record a Macro and then bring up the VBA window and inspect the code written by the Macro Recorder".

Good luck!

/J

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://720358]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-07-23 20:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.