in reply to Outlook OLE Delete Attachments
The approach I would take to debug this is to sprinkle print statements to log to csv in all those nested for and if blocks. Print maybe the subject, date, and attachment filename. Maybe simplify your code to just list all the attachments and start with a small group of emails, some with and some without attachments. Compare your logged output.
Also I would get rid of the C style for loops and do Perl style foreach loops over lists of attachments. In a quick search I found use Win32::OLE qw(in with); to import in() to let you get a list of objects. Something like foreach my $msg (in $Folder->{Items}){.
Here is an example of a similar question. Here is an even better example here at Perlmonks: Re: Win32::OLE Examples?.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Outlook OLE Delete Attachments
by cormanaz (Deacon) on Oct 17, 2014 at 12:18 UTC | |
by Lotus1 (Vicar) on Oct 17, 2014 at 14:03 UTC |