0

I use EWS to manage Emails, Contacts, Groups and Calendar of Exchange server accounts.

I want to add Contact Group. I have tried by following code.

            ContactGroup myContactGroup = new ContactGroup(service);
            // Give the group a name.
            myContactGroup.DisplayName = "My family";

            // Add some members to the group.
            myContactGroup.Members.Add(new GroupMember("sadie@contoso.com"));
            myContactGroup.Members.Add(new GroupMember("alfred@contoso.com"));

            // Save the group.
            myContactGroup.Save();

But this method is for Exchange 2010 and greater version? Can anybody suggest me how to add/update Contact Group for Exchange-2007?

Nanji Mange
  • 2,155
  • 4
  • 29
  • 63

1 Answers1

0

On 2007 with EWS the only way to do this is to modify the Extended properties relating to the Members there's an old sample in https://social.technet.microsoft.com/Forums/office/en-US/b01cefad-b8a7-431f-82b1-c0a1ce2b1da8/add-members-to-a-public-distribution-list-programmatically-using-ews?forum=exchangesvrdevelopment

Cheers Glen

Glen Scales
  • 20,495
  • 1
  • 20
  • 23
  • Thank you. I am working on Windows Application(C#) and using ews (using Microsoft.Exchange.WebServices.Data). I don't get most class & properties like CreateItemType, DistinguishedFolderIdType, BaseFolderIdType, ExtendedPropertyType, PathToExtendedFieldType, NonEmptyArrayOfPropertyValuesType etc.. Am I missing any reference? – Nanji Mange Oct 21 '15 at 04:40