VSTO Outlook integration - Outlook shutdown event for synchronization

前端 未结 1 1123
春和景丽
春和景丽 2021-01-21 17:55

I\'m working on a VSTO Outlook 2007 add-in that basically synchronizes Outlook data with web service. There are three types of synchronization that I want to have in the app: st

相关标签:
1条回答
  • 2021-01-21 18:28

    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.

    0 讨论(0)
提交回复
热议问题