View Single Post
  #5  
Old February 19th 10, 04:23 PM posted to microsoft.public.outlook.program_vba
Sanya Ibrahim[_2_]
external usenet poster
 
Posts: 3
Default Identify Read Recepits

Well, I tried it. I am getting into a strange situation wherein:-
(a) The EntryCollection argument has string values
(b) I split the EntryCollection string on "," and use the individual
EntryID strings to retrieve the mail Items
(c) However, the GetItemFromID(EntryID) returns nothing. The EntryID
argument is not null and the value does not correspond to the new inmail.

What to do?

"Ken Slovak - [MVP - Outlook]" wrote:

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