Hello,
I have an excel macro that creates a CSV file and sends the file to a server for processing. Once the processing is complete, the server sends an email to the user to let them know the processing is done. What I would like to do is create a VBA Macro that triggers an event in Microsoft Outlook each time outlook receives a new email. From the reading I've done, this is possible, but I can't get it to work.
Here is the code that I've put into the VBA Editor in MS Outlook:
If I can get this event to fire, then I think I can figure out how to look at the new mail message and get the information I need. I just can't figure out how to get a new message to trigger this procedure.
I've changed the security settings so macros should run and I'm using Outlook 2007.
Thanks In Advance.
I have an excel macro that creates a CSV file and sends the file to a server for processing. Once the processing is complete, the server sends an email to the user to let them know the processing is done. What I would like to do is create a VBA Macro that triggers an event in Microsoft Outlook each time outlook receives a new email. From the reading I've done, this is possible, but I can't get it to work.
Here is the code that I've put into the VBA Editor in MS Outlook:
Code:
Private Sub Application_NewMail()
MsgBox "hello world"
End Sub
If I can get this event to fire, then I think I can figure out how to look at the new mail message and get the information I need. I just can't figure out how to get a new message to trigger this procedure.
I've changed the security settings so macros should run and I'm using Outlook 2007.
Thanks In Advance.