none
[E2013][EWS] Properly update contact mailing address RRS feed

  • Question

  • Hi all,

    Using EWS managed Api / C# and Exchange 2013, I'm trying to properly update the mailing address of a contact. So basically, I want 2 things:

    1. make the checkbox "This is the mailing address" checked in Outlook for a given address type

    2. make the mailing address to appear correctly in contacts detailled list view

    For #1, I update the PostalAddressIndex property of the contact. So far so good, it works great.

    For #2, I would think that updating the PostalAddressIndex would be sufficient but it's not. So I update the following extended properties: 0x3A15 (Mailing address), 0x3A27 (Mailing address city), 0x3A26 (Mailing address country), 0x3A2A (Mailing address zipcode), 0x3A28 (Mailing address state), 0x3A29 (Mailing address street).

    The problem I have here is that it seems I need to format myself the address and fill the property 0x3A15. The formatting of a  postal address can be quite complex, and I don' want necessary to use a third library for that (if it exists). 

    So is there any way to just give Exchange the fields separately (street, city, country...), and Exchange or Outlook would take care of formatting the address when displaying it?

    When I try to fill the separate extended props and not the mailing address field (0x3A15), the mailing address is just not displayed in Outlook.

    Thanks for your help

    Alexandre Defalque


    Tuesday, February 9, 2016 11:21 AM