![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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() |
Ads |
#2
|
|||
|
|||
![]()
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. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Al_21_11" wrote in message ... 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() |
#3
|
|||
|
|||
![]()
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? "Ken Slovak - [MVP - Outlook]" wrote: 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. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Al_21_11" wrote in message ... 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() |
#4
|
|||
|
|||
![]()
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. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Al_21_11" wrote in message ... 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? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Automatic response to emails based on words in subject or body | Erin | Outlook - Using Forms | 3 | October 28th 07 12:55 PM |
Saving Attachments using VBA and parsing information from subject/body | [email protected] | Outlook and VBA | 3 | December 12th 06 07:56 PM |
Blank Email Body and Subject | paloli | Outlook - General Queries | 1 | December 8th 06 02:12 PM |
How create rule that searches BOTH body and subject (OR not AND)? | kdez | Outlook - General Queries | 3 | May 17th 06 04:59 PM |
How to filter email with blank subject, to, and message body | ken4az | Outlook - Installation | 0 | January 20th 06 05:27 PM |