How can I ensure "MyEmail" object is not currently displayed in the Preview Pane?
Posted on 2013-05-15
My VB script examines the attachment on certain incoming emails, and deletes them if the attachment is OK.
If the email to be deleted happens to be the one displayed in the Preview Pane, the VB script fails with "Outlook cannot delete this item". (It's usually not, so the script works most of the time).
How can I guarantee that the email I need to delete is NOT the one displayed in the Preview Pane?