#!C:\Perl\bin\perl5.8.4.exe use strict; use Win32::OLE; use Win32::OLE::Const 'Microsoft Word'; system("set PERL5OPT=-MWild"); my $file = $ARGV[0] or die "Perl says: $!\n\nThis means:\nSyntax is...\n\tpq_jnl_conv.pl filename(s)\n"; my $Word = Win32::OLE->new('Word.Application', 'Quit'); while ( $file = shift) { print "$file.html\n"; # $Word->{'Visible'} = 1; # if you want to see what's going on $Word->Documents->Open("$file") || die("Unable to open document $file\n", Win32::OLE->LastError()); $Word->ActiveDocument->SaveAs ( { FileName => "$file.html", FileFormat => FormatHTML } ); }