你如何使用ExplorerEvents_10_CloseEventHandler?

How do you use the ExplorerEvents_10_CloseEventHandler?

我想在 InLineResponse 关闭时 运行 一些代码。例如,如果用户要使用插件来弹出回复,以便在内联响应关闭时调用某些代码。

我已经找到了以下文档,解释了我认为可以完成工作的功能。 https://docs.microsoft.com/en-us/office/vba/api/outlook.explorer.inlineresponseclose https://docs.microsoft.com/en-us/dotnet/api/microsoft.office.interop.outlook.explorerevents_10_closeeventhandler?view=outlook-pia 但是我仍然不确定如何在代码中执行此操作。

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}