How I can recognize outgoing and incoming messages?

  • Thread starter Thread starter smalolepszy
  • Start date Start date
S

smalolepszy

I have a MailItem and now I want to know if it's incoming or outgoing
messages.

How I can do it?

Sub mail()
Dim a As MAPIFolder
Set a = GetNamespace("MAPI").GetFolderFromID("000000000ED585E585F16145AD566483B11F919242840000")
Dim iAs Integer
Dim b As MailItem


For i = 1 To a.items.Count
Set b = a.items.Item(i)
Next i
End Sub
 
I don't think you can do that on the Outlook Object Model level, but on the
Extended MAPI level you could check if any of the PR_RCVD_xxx or
PR_RECEIVED_BY_xxx properties exist - they are only present on the incoming
messages.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top