Outlook 如何使用ExplorerEvents\u 10\u CloseEventHandler?

Outlook 如何使用ExplorerEvents\u 10\u CloseEventHandler?,outlook,vsto,outlook-addin,Outlook,Vsto,Outlook Addin,我想在InLineResponse关闭后运行一些代码。例如,如果用户要使用addin to弹出某个代码的回复,以便在inlineresponse关闭时调用该代码 我查看了以下文档,其中解释了我认为可以实现的功能。 但是,我仍然不确定如何在代码中执行此操作。您有什么问题?是否设置InlineResponseClose事件处理程序?您尝试了什么?@DmitryStreblechenko我只是不知道如何创建事件处理程序。我假设它类似于为send函数创建事件处理程序(Application.itemss

我想在InLineResponse关闭后运行一些代码。例如,如果用户要使用addin to弹出某个代码的回复,以便在inlineresponse关闭时调用该代码

我查看了以下文档,其中解释了我认为可以实现的功能。
但是,我仍然不确定如何在代码中执行此操作。

您有什么问题?是否设置InlineResponseClose事件处理程序?您尝试了什么?@DmitryStreblechenko我只是不知道如何创建事件处理程序。我假设它类似于为send函数创建事件处理程序(Application.itemssend+=new Outlook.ApplicationEvents_11_itemssendeventhandler(Application_itemssend);)是的,它没有任何不同。在这样做时,您是否遇到了特定的问题?我只是不确定要使用的确切语法。与Application.ItemSend应更改为的内容相同。我猜正确的语法是这样的“(未知)+=new Outlook.ExplorerEvents\u 10\u CloseEventHandler(ExplorerObject\u Quit);“这一切正常了”Outlook.Explorer myExplorer=Globals.ThisAddIn.Application.ActiveExplorer();((Outlook.ExplorerEvents\u 10\u事件)myExplorer).InlineResponseClose+=新建Outlook.ExplorerEvents\u 10\u InlineResponseCloseEventHandler(Explorer\u InlineResponseClose);”
Outlook.Explorer myExplorer = Globals.ThisAddIn.Application.ActiveExplorer();
((Outlook.ExplorerEvents_10_Event)myExplorer).InlineResponseClose+= new Outlook.ExplorerEvents_10_InlineResponseCloseEventHandler(Explorer_InlineResponseClose);

void Explorer_InlineResponseClose(){ // Code to run here}