Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Win32::OLE and Word

by Util (Priest)
on Sep 27, 2005 at 01:58 UTC ( #495250=note: print w/replies, xml ) Need Help??


in reply to Re: Win32::OLE and Word
in thread Win32::OLE and Word

Best of both worlds:
Adapted from Win32::ole and MSWord:

# If Word is already running, then use the existing instance, # and leave it running when we are done. # Otherwise, start a new instance of Word, and close it when # we are done. use strict; use warnings; use Win32::OLE; my $Word; eval {$Word = Win32::OLE->GetActiveObject('Word.Application')}; die "Word not installed: $@" if $@; unless (defined $Word) { $Word = Win32::OLE->new('Word.Application', sub {$_[0]->Quit}) or die "Oops, cannot start Word"; } $Word->{'Visible'} = 1; # If you want to see what's going on

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2023-02-07 11:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (39 votes). Check out past polls.

    Notices?