newMail procedure and a public folder?

  • Thread starter Thread starter Jeremy van Frank
  • Start date Start date
J

Jeremy van Frank

The newMail Procedure that runs on the Application Object - I can get
it to run on my inbox but want to know if this can be modified to be
any folder, especially a public folder and if so how to code it.
Thanks
 
It only runs on the Inbox, only runs at intervals and doesn't give you
a handle to the new item.

Use ItemAdd on the Items collection of that folder. Declare the items
collection WithEvents so you can trap ItemAdd. That way it works and
you get a handle to each new item put in that folder.
 
Ken, I'm still somewhat new to vba - trapping, withevents is still
kind of 'out there' - if you could please send sample code to give me
an idea of what you mean.

Thanks
 
Back
Top