Outlook 加载项 AppointmentItem :: 为什么它*总是* OlRecurrenceState.olApptMaster?

Outlook Add-In AppointmentItem :: Why is it *always* an OlRecurrenceState.olApptMaster?

我正在尝试确定修改后的循环 AppointmentItem 的 RecurrenceStateOlApptMasterOlApptException 还是 OlApptOccurence

我已经毫无困难地创建了定期约会,当我修改其中一个 "not-first-in-series" 约会时,它会触发 Modified 事件处理程序,但经检查它 RecurrenceState 属性 总是 OlApptMaster

第一个实例不应该是 OlApptMaster 并且后续实例是 OlApptOccurenceOlApptException 吗?如果一直返回master,修改后的如何获取?

请查看以下 MSDN 问答:

Outlook's Handling of Recurring Appointments

我引用几点:

• You get an occurrence by calling GetOccurrence().

• You are responsible for calculating the date/time of whatever recurrence you want, using the pattern for the calculation

• You also have to check the Exceptions collection for deleted instances and exceptions. You do that if GetOccurrence() fails.

看来您应该能够在异常中找到它。

Similar resource from the same author.

另请参阅 working code sample(在此处下载 calitem.vb)以了解他们如何在处理过程中找到并处理 OlApptOccurence

如果要搜索已修改的事件,请在例外中搜索。

请记住,事件实际上并不存在(想想没有结束日期的约会)。例外情况作为附件存储在主约会上,从不作为独立项目存储。因此,您收到实际更改的项目(主约会)的更改通知是完全有意义的。