I want to open word document and save as plain text with Encoding option MS-DOS and Insert-Line-Break option.
I achieved the requirement, but output not matching with the output which is done using the same by manual operation in MS-word. ie., line breaks not coming properly
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;
In reply to Save As option in Win32::OLE by Selvakumar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |