-->

Registering to the Outlook appointment item 'c

2020-07-30 04:08发布

问题:


I am writing an Outlook add-in using VSTO 2010 for Office 2007.

How can I register to the Outlook appointment item 'closed' event?

Cheers,
Doron

回答1:

You can access it via the inspector.

In Outlook each item has an associated window, that window is known as the inspector. So you can go:

var inspector = appointmentItem.GetInspector();
inspector.Close += Closed;

UPDATE:

This is one of the crappy things about the office api, there is actually a close event AND a close method.

Cast to InspectorEvents_10_Event interface first.

((InspectorEvents_10_Event)inspector).Close += Closed;



标签: vsto