View Single Post
  #4  
Old February 17th 10, 03:14 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Identify Read Recepits

Well, for one thing I wouldn't use NewMail(). It doesn't tell you what was
received and it misses things. I'd use NewMailEx() instead, which supplies a
list of items received as a list of EntryID's.

Always use F2 to open the Object Browser and that lets you see all methods,
properties and events for all Outlook items. Then use the Help to see code
samples. In the case of Application.NewMailEx() the code sample shows how to
get an item from the collection of EntryID's. That item (mai) can be used
thusly to check the MessageClass:

If ((Left(mai.MessageClass, Len("REPORT.IPM.Note")) = _
"REPORT.IPM.Note") And (Right(mail.MessageClass, _
Len("IPNRN")) = "IPNRN")) Then

' this is a read receipt, do whatever

End If

You should also become familiar with the www.outlookcode.com Web site, that
has code samples for almost anything Outlook related.

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


"Sanya Ibrahim" wrote in message
...
Thanks for the reply.
Well, I am rather new to OutLook vba. Is it possible for you to give a
sample / example code?
Sanya


Ads