Getting Subject and body information using Application.NewMail eve

  • Thread starter Thread starter Al_21_11
  • Start date Start date
A

Al_21_11

Hi I am trying to get the body and subject information when the
Application.NewMail event is fired.

this is what i have
Dim mailItem As Outlook.MailItem
mailItem.Subject()
 
NewMail is not the best event to use for that, it doesn't tell you what came
in. Use ItemAdd on the Inbox folder's Items collection or use NewMailEx,
which passes an EntryID collection string of what was added. Use one of
those events, which let you know what came in.
 
Hi Ken,
Thanks the NewMailEx works!

but the Application.NewMailEx does not fire the event for a secondary
mailbox or inbox. The only way i've been able to do this is by searching all
folders with name"inbox" and then checking for any unread items in that
folder?

Do you have an altrenate suggestions for the second part?
 
Get those other folders and their Items collections and handle ItemAdd for
those collections. NewMail and NewMailEx will only work with that Outlook
profile's delivery point, the default Inbox of the default store.
 
Back
Top