Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
error essage:#33.pl 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 ); ##############
Why? when I didn't use "use strict", no html file putout .Bareword "wdFormatHTML" not allowed while "strict subs" in use at +33.pl lines 18
can you help me ? thanks.
update (broquaint): added formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can I save my document to html page?
by Courage (Parson) on Jan 21, 2003 at 13:43 UTC | |
|
Re: Can I save my document to html page?
by elbow (Scribe) on Jan 21, 2003 at 10:38 UTC | |
by Aragorn (Curate) on Jan 21, 2003 at 11:07 UTC | |
by Aragorn (Curate) on Jan 21, 2003 at 11:46 UTC | |
|
Re: Record a macro to steer OLE Apps
by Brutha (Friar) on Jan 21, 2003 at 16:13 UTC | |
|
Re: Can I save my document to html page?
by castaway (Parson) on Jan 21, 2003 at 11:49 UTC | |
by Anonymous Monk on Jan 21, 2003 at 13:52 UTC |