开发者

Registering to the Outlook appointment item 'closed' event using VSTO

开发者 https://www.devze.com 2023-03-08 14:48 出处:网络
I am writing an Outlook开发者_StackOverflow社区 add-in using VSTO 2010 for Office 2007. How can I register to the Outlook appointment item \'closed\' event?

I am writing an Outlook开发者_StackOverflow社区 add-in using VSTO 2010 for Office 2007.

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

Cheers,

Doron


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;

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号