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 reply to Re: What is the perl equivalent of vba by gube
in thread What is the perl equivalent of vba by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":