问题
I am working on an Outlook Add-in using VSTO & C#. I need an event handler that fires when the connection status of an outook changes (i.e. from online mode to offline and vice versa). Is that possible? And is there such an event handler?
I've been searching alot on the net, but unfortunately I found nothing. I would really appreciate if anyone have insight on that or even a possible solution.
N.B: The outlook that I am using is Outlook 2007.
回答1:
There is no event that triggers when Exchange goes offline or back online. See MSDN forum reference.
The best you can do is detect the current Exchange connectivity mode via Application.Session.ExchangeConnectionMode. See related forum post.
来源:https://stackoverflow.com/questions/6072757/eventhandler-that-fires-when-the-connection-status-of-an-outook-changes