ContactItem 属性 (Outlook)ContactItem.Email3EntryID property (Outlook)

返回一个字符串, 表示联系人的第三个电子邮件条目的条目 ID。Returns a String representing the entry ID of the third email entry for the contact. 此为只读属性。Read-only.


expressionexpression. Email3EntryID

_表达式_一个代表ContactItem对象的变量。expression A variable that represents a ContactItem object.


此属性对应于 MAPI 命名属性dispidEmail3OriginalEntryIDThis property corresponds to the MAPI named property dispidEmail3OriginalEntryID.

如果您在 Microsoft visual basic 或 microsoft visual basic for Applications (VBA) 解决方案中获取此属性, owing 在某些类型问题 (而不是直接引用Email3EntryID) 中获取该属性, 则应通过**PropertyAccessor** 对象由**ContactItem** 属性返回, 指定 mapi 属性PidLidEmail3OriginalEntryId属性及其 mapi id 命名空间。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 Email3EntryID, you should get the property through the PropertyAccessor object returned by the ContactItem.PropertyAccessor property, specifying the MAPI property PidLidEmail3OriginalEntryId property and its MAPI id namespace. 在 VBA 中下面的代码示例显示了解决方法。The following code sample in VBA shows the workaround.

Public Sub GetEmail3EntryID() 
 Dim objContactFolder As Outlook.Folder 
 Dim objContactItem As Outlook.ContactItem 
 Dim objRec As Outlook.Recipient 
 Dim strEntryID As String 
 Dim oPA As Outlook.PropertyAccessor 
 Const EMAIL3_ENTRYID As String = "{00062004-0000-0000-C000-000000000046}/80A50102" 
 Set objContactFolder = Application.Session.GetDefaultFolder(olFolderContacts) 
 Set objContactItem = objContactFolder.Items(1) 
 Set oPA = objContactItem.PropertyAccessor 
 strEntryID = oPA.BinaryToString(oPA.GetProperty(EMAIL3_ENTRYID)) 
 Debug.Print strEntryID 
 Set objRec = Application.Session.GetRecipientFromID(strEntryID) 
 If objRec Is Nothing Then 
 Debug.Print "GetRecipientFromID failed" 
 Debug.Print objRec.Name 
 Debug.Print objRec.EntryID 
 End If 
 Set objContactItem = Nothing 
 Set objContactFolder = Nothing 
End Sub

另请参阅See also

创建 ContactItem 对象ContactItem Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.