A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Getting Subject and body information using Application.NewMail eve



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 12th 09, 02:26 PM posted to microsoft.public.outlook.program_addins
Al_21_11[_2_]
external usenet poster
 
Posts: 13
Default Getting Subject and body information using Application.NewMail eve

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  
Old January 12th 09, 03:09 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Getting Subject and body information using Application.NewMail eve

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  
Old January 12th 09, 04:47 PM posted to microsoft.public.outlook.program_addins
Al_21_11[_2_]
external usenet poster
 
Posts: 13
Default Getting Subject and body information using Application.NewMail

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  
Old January 12th 09, 08:42 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Getting Subject and body information using Application.NewMail

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 09:22 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.