Getting Subject and body information using Application.NewMail eve

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()
 
K

Ken Slovak - [MVP - Outlook]

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.
 
A

Al_21_11

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?
 
K

Ken Slovak - [MVP - Outlook]

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.
 

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