Run Script on New Mail

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to get a vba sub to run when new messages arrive but I am not
having any luck. I have setup a Sub something like this in a separate module
within project 1:

Sub DoNewMail(MyMail as MailItem)
msgbox MyMail.Subject
'Other stuff parsed while I'm trying to get this to run.
end sub

I have set the rule on Outlook to run a script, and have chosen
Project1.DoNewMail as the script to run for all messages received. When a
new email arrives, the code doesn't run.

Any ideas on why this isn't running?

Thanks
 
Back
Top