Outlook 加载项 - 确定 ItemSend 事件的项目类型

Outlook Add In - Determine Item type on ItemSend event

我正在尝试确定当前正在发送的 object 的项目类型或接口类型。例如,当我单击发送时,我希望我的程序确定单击按钮的 window 是 MailItem、会议项目还是内联响应。

任何帮助将不胜感激,非常感谢。

这是通过将 ItemSend 事件中的 Item 参数分配给相应的 window 类型来实现的,如下所示。

     currentMail = Item as Outlook.MailItem;
     currentAppointment = Item as Outlook.AppointmentItem;
     currentMeeting = Item as Outlook.MeetingItem;