Exchange.WebServices.Data.Contact: 邮寄地址在哪里?
Exchange.WebServices.Data.Contact: Where's the Mailing Address?
在 Exchange.WebServices.Data.Contact 的哪个位置可以找到与 Outlook.ContactItem.SelectedMailingAddress 相关的 属性?
Outlook 有 Outlook.ContactItem.SelectedMailingAddress 属性,其中包含 Microsoft.Office.Interop.Outlook.OlMailingAddress 枚举:
_currentContact.SelectedMailingAddress = Microsoft.Office.Interop.Outlook.OlMailingAddress.olBusiness;
Outlook 还会填充一整套地址属性:
_currentContact.MailingAddress = _currentContact.BusinessAddress;
_currentContact.MailingAddressCity = _currentContact.BusinessAddressCity;
_currentContact.MailingAddressCountry = _currentContact.BusinessAddressCountry;
_currentContact.MailingAddressPostalCode = _currentContact.BusinessAddressPostalCode;
_currentContact.MailingAddressState = _currentContact.BusinessAddressState;
_currentContact.MailingAddressStreet = _currentContact.BusinessAddressStreet;
但我在 EWS 中找不到任何邮寄地址。 Exchange.WebServices.Data.PhysicalAddressKey 枚举仅包含公司、家庭和其他。
我在这里拔头发!任何帮助或指导将不胜感激。
谢谢
PidLidPostalAddressId https://msdn.microsoft.com/en-us/library/ee179151(v=exchg.80).aspx 属性 指定哪个地址用作邮政地址。在 EWS 中,您需要使用扩展 属性 例如
来设置它(或获取该值)
ExtendedPropertyDefinition PidLidPostalAddressId = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Address, 0x8022, MapiPropertyType.Integer);
Contact.SetExtendedProperty(PidLidPostalAddressId, 0x00000002);
会将邮寄地址设置为公司地址
在 Exchange.WebServices.Data.Contact 的哪个位置可以找到与 Outlook.ContactItem.SelectedMailingAddress 相关的 属性?
Outlook 有 Outlook.ContactItem.SelectedMailingAddress 属性,其中包含 Microsoft.Office.Interop.Outlook.OlMailingAddress 枚举:
_currentContact.SelectedMailingAddress = Microsoft.Office.Interop.Outlook.OlMailingAddress.olBusiness;
Outlook 还会填充一整套地址属性:
_currentContact.MailingAddress = _currentContact.BusinessAddress;
_currentContact.MailingAddressCity = _currentContact.BusinessAddressCity;
_currentContact.MailingAddressCountry = _currentContact.BusinessAddressCountry;
_currentContact.MailingAddressPostalCode = _currentContact.BusinessAddressPostalCode;
_currentContact.MailingAddressState = _currentContact.BusinessAddressState;
_currentContact.MailingAddressStreet = _currentContact.BusinessAddressStreet;
但我在 EWS 中找不到任何邮寄地址。 Exchange.WebServices.Data.PhysicalAddressKey 枚举仅包含公司、家庭和其他。
我在这里拔头发!任何帮助或指导将不胜感激。
谢谢
PidLidPostalAddressId https://msdn.microsoft.com/en-us/library/ee179151(v=exchg.80).aspx 属性 指定哪个地址用作邮政地址。在 EWS 中,您需要使用扩展 属性 例如
来设置它(或获取该值)ExtendedPropertyDefinition PidLidPostalAddressId = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Address, 0x8022, MapiPropertyType.Integer);
Contact.SetExtendedProperty(PidLidPostalAddressId, 0x00000002);
会将邮寄地址设置为公司地址