[Israel.pm] perl and Win32::OLE
Yossi.Itzkovich at ecitele.com
Yossi.Itzkovich at ecitele.com
Mon Oct 4 21:47:43 PDT 2004
Hi,
I am trying the following code :
-------------------------------------
#!/usr/bin/perl
$|++;
use strict;
use warnings qw( all );
use Win32::OLE;
my $doc = 'test.doc';
-r $doc or die "Can't open $doc\n";
my $app = Win32::OLE->GetObject( $doc );
unless (defined $app)
{
print (Win32::OLE->LastError(),"\n") ;
die "open failed $doc ($!)";
}
-------------------------------------------
Although the -r $test passes, I still get this error:
Win32::OLE(0.1403) error 0x80030002: "%1 could not be found" at
I:\sh\perl\proje
ct\test2.pl line 11
eval {...} called at I:\sh\perl\project\test2.pl line 11
Win32::OLE(0.1403) error 0x80030002: "%1 could not be found"
open failed test.doc () at I:\sh\perl\project\test2.pl line 15.
I had similiar error when trying to open a MSProject file too.
Can someone help me ? I have windows 2000 Pro
Thanks
Yossi
More information about the Perl
mailing list