Link to home
Create AccountLog in
Avatar of dossbob
dossbobFlag for United States of America

asked on

How can I ensure "MyEmail" object is not currently displayed in the Preview Pane?

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?
ASKER CERTIFIED SOLUTION
Avatar of Chris Bottomley
Chris Bottomley
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of dossbob

ASKER

Chris,

Sorry to take so long to get back to this.

Looks like it should work so I'm going to award the points.

Thanks for your help.