in reply to Query an object in Perl using Win32::OLE
You need to look at Win32::OLE::Enum, since you seem to be working with collections. Handling collections is also covered in the Win32::OLE POD under Functions.
This code is untested, but I would try:
use Win32; use Win32::OLE; use Win32::OLE::Enum; # louder errors Win32::OLE->Option(Warn => 3); ... my $Enum = Win32::OLE::Enum->new($Recipe->Placements); while (defined(my $placement = $Enum->Next)) { Win32::MsgBox($placement->PlacementPart->{Refdes}); } # - or - use Win32::OLE qw/ in /; for my $placement (in $Recipe->Placements) { Win32::MsgBox($placement->PlacementPart->{Refdes}); }
--
You said you wanted to be around when I made a mistake; well, this could be it, sweetheart.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Query an object in Perl using Win32::OLE
by juo (Curate) on May 25, 2004 at 13:51 UTC |