Hi Monks,
Pls. guide me that how to run the MS-Word Macro by using Win32::OLE.
I get word object and find the pattern and replace it.
use OLE; use Win32::OLE::Const 'Microsoft Word'; my $const=Win32::OLE::Const->Load("Microsoft Word 9.0 Object Library") +; $word=GetObject OLE("Word.Application"); $word->Selection->HomeKey({unit=>$const->{'wdStory'}}); $word->Selection->Find->{'Text'}='google.com'; $word->Selection->Find->Replacement->{'Text'}='<web>google.com</web>'; $word->Selection->Find->Execute({Replace=>$const->{'wdReplaceAll'}});
I have a macro name called 'Macro1'. How to run this macro by using OLE.
Thanks in Advance
Gopal.R
In reply to Run the word macro by using Win32::OLE by gopalr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |