none
EWS and contact.categories

    Question

  • Hi,
     
    my code snippet:
     
    Dim myContact As Contact = New Contact(service)
     
    With myContact
    .CompanyName = mCompany_Name
    .DisplayName = mName
    .FileAs = ""
    .FileAsMapping = FileAsMapping.CompanySurnameGivenName
    .GivenName = mFirst_Name
    .Subject = mName
    .Surname = mSurname
     
    .Categories.Add("MyNewCategoryName")
     
    End With
     
    No problem with the code, but in Outlook, when I want to search for contacts
    with the catagory then "MyNewCategoryName" is not listed in the
    Drop-Downbox. If I enter "MyNewCategoryName" manually the contacts are
    found. How can I get "MyNewCategoryName" into the dropdownbox as
    searchcriteria?
     
    Thanks
     
     
    Volker
     
     
    EX2007/Outlook2007,2010
     
     
    Wednesday, July 07, 2010 3:56 PM

All replies

  • Stamping a contact item with a category doesn't modify the Master Category List, which is what Outlook uses to display the drop down. If you want your category to appear in the drop down, you must add it to the MCL. I have posted a code sample that shows how to access the MCL on this forum, please look for it.
    David Claux | Program Manager - Exchange Web Services
    Wednesday, July 07, 2010 10:56 PM
  • Hi David,
     
     
    If Yes, then it means that with EX2007 I cannot modify MCL via EWS. In this case I have to use WebDAV, right? But with EX2010 I have to use EWS instead of WebDAV, because WebDAV isn't supported anymore. So it is necessary to check EX-version and have both ways to access in my app?
     
     Volker
    Thursday, July 08, 2010 7:39 AM
  • You are correct.


    David Claux | Program Manager - Exchange Web Services
    Thursday, July 08, 2010 4:49 PM