Outlook RecurrencePattern.Exceptions.Count发生更改或删除后未更新 [英] Outlook RecurrencePattern.Exceptions.Count NOT updated after occurrence modified or deleted

查看:107
本文介绍了Outlook RecurrencePattern.Exceptions.Count发生更改或删除后未更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到这样一种情况:在修改或删除重复发生的事件后,并非总是更新RecurrencePattern.Exceptions对象(至少是Outlook 2010中的Count属性);有时是,但更多时候不是.此时,我不确定RecurrencePattern.Exceptions.Count是唯一未更新的属性,还是整个Exceptions集合.

I'm seeing a situation where the RecurrencePattern.Exceptions object, at least the Count property in Outlook 2010, is not always being updated after an occurrence of the recurring event is modified or deleted; sometimes it is, but more often it is not. At this point I'm not sure if the RecurrencePattern.Exceptions.Count is the only property not being updated, or if it is the entire Exceptions collection.

当我重新启动Outlook和加载项时,会反映出以前会话的所有更改……但是随后的更改有时只显示出来.

When I restart Outlook and my add-in, all changes from previous sessions are reflected ... but subsequent changes only show up sometimes.

这是Outlook中的已知错误吗?如果是,那么仅在Outlook 2010中吗?有什么解决方法吗?这是用于对SQL联系人/日历数据库进行实时更新的加载项.

Is this a known bug in Outlook, and if so is it only in Outlook 2010? Are there any workarounds? This is for an add-in that does real-time updates to a SQL contact/calendar database.

推荐答案

正如Eugene所说,您需要完全取消引用约会项.即使这样,Outlook仍非常喜欢缓存上次访问的约会,并且您需要为Outlook打开另一个约会以释放上一个约会.

As Eugene mentioned, you need to completely dereference the appointment item. Even then, Outlook really likes to cache the last accessed appointment, and you need to open another appointment for Outlook to release the previous one.

您是否看到低级别(MAPI)更新的数据?使用 OutlookSpy ,选择约会,然后单击OutlookSpy功能区上的IMessage按钮;看一下AppointmentRecur命名属性. OutlookSpy是否显示正确的异常计数?

Do you see the data updated on the low level (MAPI)? Using OutlookSpy, select the appointment and click the IMessage button on the OutlookSpy ribbon; take a look at the AppointmentRecur named property. Does OutlookSpy show the right exception count?

更新:

如果选择兑换,则可以尝试使用其

if Redemption is an option, you can try to use its RDOAppointmentItem object (the Item variable below can point to your appointment). If you want to avoid stale data, replace GetRDOObjectFromOutlookObject belwo with GetMessageFromID.

  set Session = CreateObject("Redemption.RDOSession")
  Session.MAPIOBJECT = Application.Session.MAPIOBJECT
  set Item = Session.GetMessageFromID(Application.ActiveExplorer.Selection(1).EntryID)
  set RdoItem = Session.GetRDOObjectFromOutlookObject(Item)
  set RecurPattern = RdoItem.GetRecurrencePattern
  MsgBox RecurPattern.Exceptions.Count

这篇关于Outlook RecurrencePattern.Exceptions.Count发生更改或删除后未更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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