I am working on a simple Marco that use to download selected emails' attachments. It was really a simple logic but I am still stuck.
I found out that my for each loop is always stop when it met the meeting request email. (It almost took my whole day to figure it out that the meeting request is The Barricade.) The problem can be fixed by deletion of the meeting request. And yet, it is really annoying for a lazybones like me.
Therefore, I really curious that is there any method can let the for each loop just ignore/auto unselect meeting requests?
And I have already tried detect the email subject/context to seprate the meeting requests and normal mails. But it seem like it would just exit the for each loop when it encountered the meeting request.
So currently I don't have any idea about how to fixing it.
In the loop you need to check whether the
Class
property equals to theolMail
value:For example, here is a sample code which shows how to handle different item types in Outlook:
Remember that Outlook folders may contain different kind of items - mail, appointment, document, note and etc.