To do this, you need to access the AddressEntry via the Recipient object model. The only way to retrieve the actual Recipient EntryID is by leveraging the PropertyAccessor of the ContactItem.const string Email1EntryIdPropertyAccessor = "http://schemas.microsoft.com/mapi/id/{00062004-0000-0000-C000-000000000046}/80850102";string address = string.Empty;Outlook.Folder folder = this.Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts) as Outlook.Folder;foreach (var contact in folder.Items.Cast<Outlook.ContactItem>().Where(c=>!string.IsNullOrEmpty(c.Email1EntryID))){ Outlook.PropertyAccessor propertyAccessor = contact.PropertyAccessor; object rawPropertyValue = propertyAccessor.GetProperty(Email1EntryIdPropertyAccessor); string recipientEntryID = propertyAccessor.BinaryToString(rawPropertyValue); Outlook.Recipient recipient = this.Application.Session.GetRecipientFromID(recipientEntryID); if (recipient != null && recipient.Resolve() && recipient.AddressEntry != null) address = recipient.AddressEntry.GetExchangeUser().PrimarySmtpAddress;} 这篇关于以编程方式从Exchange Outlook联系人获取Internet电子邮件地址吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-12 18:19