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

Re: Run the word macro by using Win32::OLE

by guha (Priest)
on Jan 21, 2005 at 16:51 UTC ( #424054=note: print w/ replies, xml ) Need Help??


in reply to Run the word macro by using Win32::OLE

I don't really understand the connection between your example code and the question for running a macro. However the second part of your example should be written like:

my $range = $word->ActiveDocument->Content; $range->Find->Execute( { FindText => 'google.com', ReplaceWith => '<web>google.com</web>', Replace => $const->{'wdReplaceAll'}, } );

This code is however untested.

HTH


Comment on Re: Run the word macro by using Win32::OLE
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2015-07-04 02:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls