in reply to What is the perl equivalent of vba
Hi, try this with OLE module
Please open the word document and use this
use Win32::OLE; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Word'; $word=Win32::OLE->GetActiveObject('Word.Application'); $doc= $word->activedocument; foreach my $val (in $doc->styles){ push @styles,$val->{namelocal}; } $"="\n"; print "@styles";
Regards,
Gubendran.L
|
---|
In Section
Seekers of Perl Wisdom