Skip to content

Latest commit

 

History

History
75 lines (38 loc) · 1.94 KB

Outlook.MailItem.ReceivedByEntryID.md

File metadata and controls

75 lines (38 loc) · 1.94 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
MailItem.ReceivedByEntryID property (Outlook)
vbaol11.chm1341
vbaol11.chm1341
Outlook.MailItem.ReceivedByEntryID
db4325d3-4442-220d-a812-1d3e4a0085bf
06/08/2017
medium

MailItem.ReceivedByEntryID property (Outlook)

Returns a String representing the EntryID for the true recipient as set by the transport provider delivering the mail message. Read-only.

Syntax

expression. ReceivedByEntryID

expression A variable that represents a MailItem object.

Remarks

This property corresponds to the MAPI property PidTagReceivedByEntryId.

If you are getting this property in a Microsoft Visual Basic or Microsoft Visual Basic for Applications (VBA) solution, owing to some type issues, instead of directly referencing ReceivedByEntryID, you should get the property through the PropertyAccessor object returned by the MailItem.PropertyAccessor property, specifying the PidTagReceivedByEntryId property and its MAPI proptag namespace. The following code sample in VBA shows the workaround.

Public Sub GetReceiverEntryID() 
 
 Dim objInbox As Outlook.Folder 
 
 Dim objMail As Outlook.MailItem 
 
 Dim oPA As Outlook.PropertyAccessor 
 
 Dim strEntryID As String 
 
 Const PidTagReceivedByEntryId As String = "http://schemas.microsoft.com/mapi/proptag/0x003F0102" 
 
 
 
 Set objInbox = Application.Session.GetDefaultFolder(olFolderInbox) 
 
 Set objMail = objInbox.Items(1) 
 
 Set oPA = objMail.PropertyAccessor 
 
 strEntryID = oPA.BinaryToString(oPA.GetProperty(PidTagReceivedByEntryId)) 
 
 Debug.Print strEntryID 
 
 
 
 Set objInbox = Nothing 
 
 Set objMail = Nothing 
 
End Sub

See also

MailItem Object

[!includeSupport and feedback]