VSTO Outlook integration - Outlook shutdown event for synchronization

僤鯓⒐⒋嵵緔 提交于 2019-12-02 00:34:21

Explorer.Close() and Inspector.Close() fire before Application.Quit() - in them you can check:

  • In Explorer.Close(): Application.Explorers.Count<=1 and Application.Inspectors.Count==0
  • In Inspector.Close(): Application.Explorers.Count==0 and Application.Inspectors.Count<=1

If so, Outlook will close and you can fire your events. Just keep in mind that Outlook can be started window-less too (automation etc.) if thats an issue for you.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!