- juse Win32::OLE; use Win32::OLE::Const 'Microsoft Word';; my $xfile = "C:/Documents and Settings/jim/My Documents/perlmonks_exam +ples/temp.txt"; $word = Win32::OLE->GetActiveObject('Word.Application') || Win32::OLE->new('Word.Application'); $mydoc = $word->Documents->Open($xfile); #$word->Run("tskedfmt"); ($xfn) = $xfile =~ m/(.*)\.txt$/; $xfn .= ".doc"; $mydoc->SaveAs( {FileName => "$xfn", FileFormat => wdFormatDocument} ) +; $word->{Visible} = 1;
In reply to Re: "type mismatch" in Word
by jimbojones
in thread "type mismatch" in Word
by esr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |