开发者

Ribbon Load events and Outlook Exchange connection

开发者 https://www.devze.com 2023-03-11 13:37 出处:网络
I\'m using Ribbon XML for my Outlook 2010 add-in project. When I try to detect the ExchangeConnectionMode during the Ribbon Load event. If I turn off the internet connection, it will give me disconnec

I'm using Ribbon XML for my Outlook 2010 add-in project. When I try to detect the ExchangeConnectionMode during the Ribbon Load event. If I turn off the internet connection, it will give me disconnect status but when I turn on the internet connection. It still give me disconnect status too!

After playing with Ribbons Load event for a while I noticed Outlook is displayed before a Windows Security dialog pop up to ask you for Exchange Account login/password.

My question is, does Ribbon load event come before Exchange connection. Is开发者_开发百科 there a way to reload the Ribbon if Exchange connection run after Ribbon is loaded? Because some controls on the ribbon depend on whether Exchange connection is established.


I'm pretty sure Outlook is like Word or Excel when it comes to the ribbon, ie, you get one shot to load it and that's it, and worse, at the point that the ribbon is loaded, there are often elements of the app that have not been started up you (the internet connection could very well be one in Outlook, though I'm not certain about that).

A better tack would be to populate the ribbon with all the controls you'll need for your addin, then HIDE or DISABLE certain controls as appropriate.

then using either a timer or other Outlook generated event, check for the connection status later and ENABLE or DISABLE (or HIDE/SHOW) the applicable controls at that point.

0

精彩评论

暂无评论...
验证码 换一张
取 消