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.
"Sanya Ibrahim" <SanyaIbrahim> wrote in message
news:0ABE7D91-1393-4B70-A5E7-A3200E894522@microsoft.com...
> Thanks for the reply.
> Well, I am rather new to OutLook vba. Is it possible for you to give a
> sample / example code?
> Sanya