in reply to Win32::OLE Outlook Error
Anyone know how to avoid this error?
Sure, satisfy the API and/or trap the error
... my $end = $folder->Items->Count; for my $ix ( reverse $end-5 .. $end ){ print "==========" x 7, "\n"; my $item = $folder->Items->Item( $ix ); for my $field ( @fields ){ ## my $val = eval { $item->{ $field } }; my $val; eval { $val = $item->{ $field }; 1 } or do { warn "uhoh $folder $ix $item $field : $@ "; next; }; print "$field: $val\n"; } } ... my $count = $obj->Folders->Count; for my $ix ( 1 .. $count ){ my $item = $obj->Folders->Item($i); return $item if $item->name eq $target }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Win32::OLE Outlook Error
by cormanaz (Deacon) on Oct 09, 2014 at 13:25 UTC |