简体   繁体   English

更新现有的Outlook约会

[英]Update an Existing Outlook Appointment

Having created an outlook appointment doing something like this; 创建了一个Outlook约会,做这样的事情;

 Microsoft.Office.Interop.Outlook.Application app = null;
 Microsoft.Office.Interop.Outlook.AppointmentItem appt = null;

 app = new Microsoft.Office.Interop.Outlook.Application();

 appt = (Microsoft.Office.Interop.Outlook.AppointmentItem)app.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olAppointmentItem);
 appt.Subject = sub;
 appt.Body = body;
 appt.Location = Loc;
 appt.Recipients.Add(email);
 appt.Save();
 appt.Send();

 Outlook.MailItem mailItem = appt.ForwardAsVcal();
 mailItem.To = email;
 mailItem.Body = body;
 mailItem.Send();

Looking for pointers, as I'm having difficulty finding a definitive answer via Google. 寻找指针,因为我很难通过Google找到确定的答案。

How do I then (at a later date..) retrieve this appointment again from one or more outlook accounts and update some details? 然后,我如何(以后再..)从一个或多个Outlook帐户再次检索此约会并更新一些详细信息?

Or is it possible to release a new appointment that will overwrite the existing one? 还是有可能发布新的约会以覆盖现有约会?

If you are always accessing the appointment from the same mailbox, store the value of the AppointmentItem.EntryID property and reopen it at a later point using Namespace.GetItemfromID. 如果您始终从同一邮箱访问约会,请存储AppointmentItem.EntryID属性的值,并在以后使用Namespace.GetItemfromID重新打开它。

If you need to access the appointment from multiple mailboxes, read the value of the AppointmentItem.GlobalAppointmentID. 如果您需要从多个邮箱访问约会,请读取AppointmentItem.GlobalAppointmentID的值。 Unfortunately Outlook Object Model would not let you search on a binary property (MAPIFolder.Items.Find). 不幸的是,Outlook对象模型不允许您搜索二进制属性(MAPIFolder.Items.Find)。 You would need to either drop down to the Extended MAPI level (C++ or Delphi) or use Redemption - see http://social.msdn.microsoft.com/Forums/en-US/outlookdev/thread/63ea7bda-9767-4145-8ced-78e1095a49f8/ 您需要下拉至扩展MAPI级别(C ++或Delphi)或使用“兑换”-请参阅http://social.msdn.microsoft.com/Forums/zh-CN/outlookdev/thread/63ea7bda-9767-4145- 8ced-78e1095a49f8 /

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM