Hi.
Please excuse if this has already been answered somewhere, but of so I can't see it.
I have anumber of programs where I have written a procedure in visual basic, and it operates within Word. As an example, I have a sequence which calls up a word document which contains a VB module called "doFindReplace".:
e.g. (with irrelevant things omitted):
use Win32::OLE::Const;
my $oWord = Win32::OLE->GetActiveObject('Word.Application') || Win32::OLE->new('Word.Application', 'Quit');
my $oDoc = $oWord->Documents->Open("E:/$inputfilename");
$oDoc->{doFindReplace}->{Execute}->{Pause}=1; # Run the Macro in the document
$oWord->{ActiveDocument}->SaveAs("E:/$outputfilename");
$oWord->{ActiveDocument}->Close;
$oDoc->SaveAs("E:/waste.doc");
$oDoc->Close;
unlink("E:/waste.doc");
$oWord->Quit();
***************
My question is, does anyone know how I can pass a value from Perl to the VB module? I imagine it would be something in the line which fires off the module, but I cannot figure it out.
All help greatly appreciated. And thanks even if no-one knows.
I'm running Office 2000 on Win2K and Vista. Vista does seem to affect things somewhat!
Please excuse if this has already been answered somewhere, but of so I can't see it.
I have anumber of programs where I have written a procedure in visual basic, and it operates within Word. As an example, I have a sequence which calls up a word document which contains a VB module called "doFindReplace".:
e.g. (with irrelevant things omitted):
use Win32::OLE::Const;
my $oWord = Win32::OLE->GetActiveObject('Word.Application') || Win32::OLE->new('Word.Application', 'Quit');
my $oDoc = $oWord->Documents->Open("E:/$inputfilename");
$oDoc->{doFindReplace}->{Execute}->{Pause}=1; # Run the Macro in the document
$oWord->{ActiveDocument}->SaveAs("E:/$outputfilename");
$oWord->{ActiveDocument}->Close;
$oDoc->SaveAs("E:/waste.doc");
$oDoc->Close;
unlink("E:/waste.doc");
$oWord->Quit();
***************
My question is, does anyone know how I can pass a value from Perl to the VB module? I imagine it would be something in the line which fires off the module, but I cannot figure it out.
All help greatly appreciated. And thanks even if no-one knows.
I'm running Office 2000 on Win2K and Vista. Vista does seem to affect things somewhat!