- or download this
my $word = Win32::OLE->GetActiveObject('Word.Application')
|| Win32::OLE->new('Word.Application','Quit')
or die Win32::OLE->LastError();
- or download this
my $doc = $word->Documents->Open('C:\\Perl\\home\\001f.doc');
- or download this
my $doc = $word->Documents->Open( { FileName => 'C:\\Perl\\home\\001f.
+doc', ReadOnly =>1 }) or die Win32::OLE->LastError();
SaveAs({FileName => 'exampletext.doc', FileFormat => wdFormatDocument
+,})
$doc->Close( { SaveChanges => $wdc->{wdDoNotSaveChanges} } );
- or download this
Class Selection
Member of Word
...
Property Characters As Characters
read-only
Member of Word.Selection
- or download this
#!/usr/bin/perl
use Cwd 'abs_path';
...
Words:1
Characters:1
Paragraphs: 1
- or download this
#!/usr/bin/perl -w
...
$Word->ActiveDocument->Close ;
$Word->exit;
$Word->Quit;