Outlook加载项:在日历中移动约会不会反映AppointmentItem中的新日期/时间(捕获Calendar.ItemChange) [英] Outlook Addin: Moving Appointment in Calendar does not reflect new date/time in AppointmentItem (catch Calendar.ItemChange)

查看:167
本文介绍了Outlook加载项:在日历中移动约会不会反映AppointmentItem中的新日期/时间(捕获Calendar.ItemChange)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试开发一个Outlook插件,该插件每当服务提供商在其日历中移动约会(通过拖放)时都会更新Web服务. 在基于VSTO的Outlook外接程序(在Outlook 2016中)中,当用户移动日历项时,我的Item_Change被触发. 但是,当我检查AppointmentItem时,将其作为对

i am trying to develop an Outlook Addin which updates a web services whenevery the ser moves an appointment (with drag and drop) in his calendar. In my VSTO based Outlook Addin (in Outlook 2016) my Item_Change gets fired when the user moves the calendar item around. But when I inspect the AppointmentItem which I get as a parameter of the call to

public void Item_Change(Object item)
{
    Outlook.AppointmentItem myAppointment = item as Outlook.AppointmentItem;                        

myAppointment.StartUTC仍然显示旧值,而不是用户将其移动到的值(日期/时间).

the myAppointment.StartUTC still shows the old value instead of the value (date/time) where the user has moved the item.

有人知道如何检索移动的AppointmentItem的新日期/时间吗?

Does anyone know how to retrieve the new date/time of a moved AppointmentItem?

预先感谢

推荐答案

不使用Outlook Objector模型-它喜欢缓存旧的过时的值.所有项目都会受到影响,但约会的情况最差-有时您还需要更改当前文件夹并返回.您将需要释放有问题的项目,打开另一个项目,然后才通过条目ID打开该项目.您无法从引发事件的项目的事件处理程序中做到这一点.

Not using the Outlook Objector Model - it likes caching old stale values. All items are affected, but appointments are the worst - sometimes you would also need to change the current folder and come back. You would need to release the item in question, open another item, and only then open this item by its entry id. The problem you cannot do that from the event handler of the item that raises the event.

您仅有的其他选项是扩展MAPI(仅限C ++或Delphi)或兑换".

Your only other options are Extended MAPI (C++ or Delphi only) or Redemption.

这篇关于Outlook加载项:在日历中移动约会不会反映AppointmentItem中的新日期/时间(捕获Calendar.ItemChange)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆