在我的外接程序中,我像这样附加到ItemChange事件;
public void attachEvents()
{
_CalendarItems.ItemChange += Item_Change;
我写了一个这样的函数:
public void Item_Add(Object item)
{
Outlook.AppointmentItem myAppointment = item as Outlook.AppointmentItem;
if (myAppointment != null)
{
..。
我的问题是,当我调用myAppointment.save()时,这个方法不是只调用一次,而是3-4次。为什么会这样呢?
而且在eventhandler中只有get()调用,所以appointmentItem中没有任何变化(当然,这可能会触发更多的事件)。
向Hannes致以最好的问候
发布于 2018-07-05 02:58:36
这是意料之中的。特别是在Outlook中配置Exchange配置文件的情况下。你可能会发现类似的论坛帖子,就像下面这样- Outlook 2016 produces an extra ItemChange event after an appointment is created。
https://stackoverflow.com/questions/51179072
复制相似问题