Hi,
ich würde gern ein bestimmten Outlook-Kontakt updaten, nur wie? So prüfe ich, ob er vorhanden ist oder nicht:
Outlook.Application OutlookApp = new Outlook.Application();
Outlook.NameSpace outlookNameSpace = null;
outlookNameSpace = OutlookApp.GetNamespace("MAPI");
Outlook.MAPIFolder contactsFolder =
outlookNameSpace.GetDefaultFolder(
Microsoft.Office.Interop.Outlook.
OlDefaultFolders.olFolderContacts);
Outlook.Items contactItems = contactsFolder.Items;
try
{
Outlook.ContactItem contact = (Outlook.ContactItem)contactItems.Find(String.Format("[Email1Address]='{0}' and " + "[User3]='{1}'", mail_s, mand_s));
if (contact != null)
{
// vorhanden
found_b = true;
}
else
{
// Nicht gefunden
found_b = false;
}
}
catch (Exception ex)
{
found_b = false;
}Im Grunde hätte ich ja den Contact bereits im Zugriff. Nur wenn ich diesen unter //vorhanden ändern und mit .save abschließe
erhalte ich einen neuen Kontakt! Kann mir da jemand helfen?
Vielen Dank und guten Rutsch..
lg
ww