• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

VBA to send reminder email if no response

Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server 2013
Halo Team,

I am looking for a VBA to send follow up/reminder email if there is no response received within 1 day. The action should happen on emails where subject line states "Attention".

I found few VBA codes however I am getting an error. "Compile error: Only valid in object module"

Below is the part of the code where am getting error.

Private WithEvents olSentItems As Items

Thank you in advance for your help.