MailItem.ReceivedOnBehalfOfEntryID プロパティ (Outlook)

代理受信者のメール メッセージの エントリ Id を表す 文字列 を返します。 読み取り専用です。

構文

expressionReceivedOnBehalfOfEntryID

expressionMailItem オブジェクトを表す変数です。

注釈

このプロパティは、MAPI プロパティの PidTagReceivedRepresentingEntryId に対応します。

ReceivedOnBehalfOfEntryID を直接参照する代わりに、いくつかの型の問題により、(VBA) ソリューションでは、Microsoft Visual Basic または Microsoft Visual Basic for Applications には、このプロパティを取得する場合する必要がありますプロパティを取得した、 MailItem.PropertyAccessor プロパティによって返される PropertyAccessor オブジェクトを MAPI プロパティの PidTagReceivedRepresentingEntryId プロパティは、MAPI proptag 名前空間を指定します。 VBA では、次のコード サンプルでは、この回避策を示します。

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

関連項目

MailItem オブジェクト

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。