Selvakumar has asked for the wisdom of the Perl Monks concerning the following question:
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Save As option in Win32::OLE
by wfsp (Abbot) on Jun 17, 2009 at 09:09 UTC | |
|
Re: Save As option in Win32::OLE
by Anonymous Monk on Jun 17, 2009 at 07:37 UTC | |
by Selvakumar (Scribe) on Jun 17, 2009 at 07:49 UTC | |
by Corion (Patriarch) on Jun 17, 2009 at 08:01 UTC | |
by Selvakumar (Scribe) on Jun 17, 2009 at 08:56 UTC | |
by Corion (Patriarch) on Jun 17, 2009 at 09:10 UTC | |
| |
|
Re: Save As option in Win32::OLE
by Anonymous Monk on Jun 17, 2009 at 07:38 UTC |