Save As option in Win32::OLE
"Ramkumar" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Organization | PMG |
| Message-ID | <[email protected]> |
Hi all,
I am opening word document through Win32::OLE and saving as Plain Text with
Encoding option MS-DOS and Insert-Line-Break option.
I achieved the above output through perl, but output not matching with the
output which is done the same manual operation in MS-word.
My code:
my $Word = Win32::OLE->new('Word.Application');
$Word->{'Visible'} = 0;
$Word->{DisplayAlerts} = 0;
my $doc = $Word->Documents->Open("$folderpath\\Chapter 1.doc");
$Word->ActiveDocument->SaveAs({FileName=>"$folderpath\\Chapter
1.txt", FileFormat=>wdFormatDOSTextLineBreaks});
$Word->{ActiveDocument}->Close;
$doc->Close;
$Word->Close;
Please correct me if I did any mistake on the above code.
Regards,
Ramkumar,
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs