Run Script on New Mail

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top