[Israel.pm] perl and Win32::OLE
Roee Friedman
roee_fr at netvision.net.il
Mon Oct 4 23:48:56 PDT 2004
Yossi.Itzkovich at ecitele.com wrote:
>
>
>
>Hi,
>
>I am trying the following code :
>-------------------------------------
>#!/usr/bin/perl
>$|++;
>
>use strict;
>use warnings qw( all );
>
>use Win32::OLE;
>
>my $doc = 'test.doc';
>
>
Use full path here. (Yeah, it suppose to work either way. It doesn't)
Roee
>-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
>
>_______________________________________________
>Perl mailing list
>Perl at perl.org.il
>http://perl.org.il/mailman/listinfo/perl
>
>
>
More information about the Perl
mailing list