Answer the question
In order to leave comments, you need to log in
Problem with VBA macro due to email processing rules in Outlook, how to make friends with them?
Outlook 2019 has a macro that handles the inbox event. The macro checks the subject of the incoming email, and if it matches the template, the user is asked to open the email, which, if confirmed, is opened via the Display method of the MailItem object. The problem is that the rules for sorting incoming mail are also configured, which in the background move letters to subfolders, as a result of which the Display method crashes with an error (when the letter is obviously moved)
How to make rules and a macro fit together? How to correctly open a letter processed in a macro via Display?
Answer the question
In order to leave comments, you need to log in
I decided this way: I enabled the ability to run a macro in the rules (disabled by default starting from outlook 2013, you need to tweak the registry) and hung a macro (s) on the rule.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question