使用EWS将新的Outlook联系人添加到自动填充功能?

时间:2015-05-08 20:08:58

标签: c# .net outlook exchangewebservices

我使用以下代码成功地将新联系人添加到用户Outlook通讯录:

Contact contact = new Contact(_service);
contact.GivenName = firstName;
contact.Surname = lastName;
contact.DisplayName = string.Format("{0} {1}", firstName, lastName);
contact.EmailAddresses[EmailAddressKey.EmailAddress1] = email;
contact.EmailAddresses[EmailAddressKey.EmailAddress1].Address = email;
contact.EmailAddresses[EmailAddressKey.EmailAddress1].Name = string.Format("{0} {1}", firstName, lastName);
contact.PhoneNumbers[PhoneNumberKey.PrimaryPhone] = phoneNumber;
contact.CompanyName = companyName;
contact.NickName = string.Format("{0} {1}", firstName, lastName);

contact.Save();

但是,在为“'”创建新电子邮件时,新联系人未显示在自动填充列表中。领域。如果我在Outlook中手动创建新联系人,则自动完成功能会选择新联系人,并且他们将在列表中显示。有没有办法使用EWS将这个新联系人添加到该自动完成列表?我正在使用Outlook 2010

0 个答案:

没有答案