in reply to Can I save my document to html page?
use strict; use Win32::OLE; use Win32::OLE::Const 'Microsoft Word'; # imports word constants like wdFormtaDosTxtLineBreaks my $Word = Win32::OLE->new( 'Word.Application', 'Quit' ); $Word->{'Visible'} = 1; # second argument tells OLE what to do if everything goes tits up my $Document = $Word->Documents->Open( "f:\\aa.doc" ); $Document->SaveAs( { FileName => 'bb.htm', FileFormat => wdFormatHTML +} ); # NOTE!!! wdFormatDOSTextLineBreaks, wdFormatHTML, etc., are #constants, not strings, so don't quote them! $Document->Close(); $Word->Quit(); exit( 0 );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Can I save my document to html page?
by Aragorn (Curate) on Jan 21, 2003 at 11:07 UTC | |
by Aragorn (Curate) on Jan 21, 2003 at 11:46 UTC |