VSTO 开发outlook插件,寻找关闭事件

qq_23239547 2014-11-13 10:19:10
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
GetMails();
}

private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
{
WriteintoTxt("ThisAddIn_Shutdown().....");
}

自带的两个方法,其中打开outlook时ThisAddIn_Startup方法可以运行。
但是在我关闭outlook时ThisAddIn_Shutdown为什么部执行?求关闭outlook 的关闭事件
...全文
420 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
X-i-n 2014-11-14
  • 打赏
  • 举报
回复
手滑,粘一半丢一半,不影响意思。你再确认一下吧。
X-i-n 2014-11-14
  • 打赏
  • 举报
回复
检查一下有没有这段。office2010? 程序关闭的时候不通知addin了。
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InternalStartup()
        {
            this.Startup += new System.EventHandler(ThisAddIn_Startup);
            this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
        }
        
        #endregion

5,139

社区成员

发帖
与我相关
我的任务
社区描述
其他开发语言 Office开发/ VBA
社区管理员
  • Office开发/ VBA社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧