On Tue, 09 Aug 2005, Larry Lords wrote:
> I am trying to upgraded to ActivePerl 5.8.7 from 5.8.4 on my Windows
> XP machine.
>
> I am now getting an Win32::OLE error on a statement that has worked
> correctly for quite awhile on the old system.
>
> The statement seems to work correctly but throws the following
> message:
>  
> Win32::OLE (0.1403) error 0x800a9c68 in METHOD/PROPERTYGET "Run" at
=ine number. 
>  
> The code is very simple and is as follows: 
>  
>    $Book =
$Excel->Workbooks->Open("T:\\AB_Dashboard\\ab_dashboard.xls");
>    $Excel->Run("open_close");
>  
> After further investigation I have found that if I put an -w
> (#!/usr/bin/perl -w) in 5.8.4 I get the same error message, but I get
> the message in 5.8.7 whether I have the -w option or not. Any ideas?
>
> I can open and execute the macro manually with no errors.
>
> I would appreciate any suggestions or alternatives.

Win32::OLE warnings are indeed controlled in part by the setting of the
-w warnings flag.  However, I cannot see that warnings are on by default
in 5.8.7 and cannot reproduce your behaviour.  With Perl 5.8.7:

  D:\>perl -MWin32::OLE -e "Win32::OLE->new('x')"

  D:\>perl -MWin32::OLE -w -e "Win32::OLE->new('x')"
  Win32::OLE(0.1702) error 0x800401f3: "Invalid class string" at -e line
1
          eval {...} called at -e line 1

So I only get the warnings when I use the -w option.

You may want to check the output of

    perl -eprint$^W

which should print "0", and the output of `perl -V` to see if there are
any
hints why -w would be on by default.

Cheers,
-Jan


_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to