我需要以編程方式將聯繫人插入到使用C#應用程序的Outlook聯繫人。 我正在使用Microsoft.Office.Interop.Outlook.ContactItem對象。如何從.NET設置Outlook聯繫人「Notes」屬性
我然而,它似乎很能設定姓名,電子郵件,電話等並沒有對「註釋」
屬性我如何設置Outlook聯繫人的筆記?
這裏是我使用的代碼:
Microsoft.Office.Interop.Outlook._Application outlookObj = new Microsoft.Office.Interop.Outlook.Application();
Microsoft.Office.Interop.Outlook.MAPIFolder fldContacts = (Microsoft.Office.Interop.Outlook.MAPIFolder)outlookObj.Session.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderContacts);
Microsoft.Office.Interop.Outlook.ContactItem newContact = (Microsoft.Office.Interop.Outlook.ContactItem)fldContacts.Items.Add(Microsoft.Office.Interop.Outlook.OlItemType.olContactItem);
newContact.FullName ="Whatever Name";
newContact.Email1Address = "[email protected]";
//no property for newContact.Notes :(
newContact.Save();