Axel Tietje wrote:
> 
> Hi,
> 
> is there anyone out there who knows more about
> Win32::OLE than I do?

I can think of at least one person who knows more about Win32::OLE than
all of us combined.  That is its author, Jan Dubois.

> I have some problems with
> the objects, methods and properties that can be
> used with MS Word. For example: What's wrong
> with these lines:
> 
> my $s1 = $doc->Styles("Standard");
> $word->Selection->({Style => $s1}); # this is line 43
> 
> I get the following Error:
> 'Not a CODE reference at word.pl line 43.'
> 
> Could anyone please tell me what's wrong?

I'm not familiar with the syntax you're using there, but it looks like
Win32::OLE is expecting the reference created by '{Style => $s1}' to
point to a subroutine, and complains when it finds a hash instead.

You should be able to achieve the same result with
'$word->Selection->{Style} = $s1'


HTH,
Ian


-- 
99 little bugs in the code, 99 bugs in the code.
Fix one bug, compile again, 100 little bugs in the code.
100 little bugs in the code, 100 bugs in the code.
Fix one bug, compile again, 101 little bugs in the code...

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to