oliv-
Senior Member
- Outlook version
- Outlook 2010 32 bit
- Email Account
- Exchange Server
Hi,
I usually use this test to find out if the email is incoming or outgoing.
But now i see that Emails sent via the Outlook Android Application return .ReceivedByName = "My name"
and Emails sent by TypeApp (Android) return a Internet Message Header !
is there a better way ?
I usually use this test to find out if the email is incoming or outgoing.
But now i see that Emails sent via the Outlook Android Application return .ReceivedByName = "My name"
and Emails sent by TypeApp (Android) return a Internet Message Header !
Code:
Const PR_TRANSPORT_MESSAGE_HEADERS = "http://schemas.microsoft.com/mapi/proptag/0x007D001E"
Set objmail = ActiveInspector.CurrentItem
Set olkPA = objmail.propertyAccessor
GetInetHeaders = olkPA.GetProperty(PR_TRANSPORT_MESSAGE_HEADERS)
If objmail.Sent = True And objmail.ReceivedByName = "" Then
sens = "out"
ElseIf objmail.Sent = True And GetInetHeaders= "" Then
sens = "out"
ElseIf objmail.Sent = True And objmail.ReceivedByName <> "" Then
sens = "in"
Else
sens = "Draft"
End If