功能区加载事件和 Outlook Exchange 连接
我正在为我的 Outlook 2010 加载项项目使用功能区 XML。当我尝试在功能区加载事件期间检测 ExchangeConnectionMode 时。如果我关闭互联网连接,它会给我断开连接状态,但当我打开互联网连接时。它仍然给我断开状态!
在使用 Ribbons Load 事件一段时间后,我注意到在弹出 Windows 安全对话框询问您 Exchange 帐户登录名/密码之前会显示 Outlook。
我的问题是,功能区加载事件是否在 Exchange 连接之前发生。如果在加载功能区后运行 Exchange 连接,是否可以重新加载功能区?因为功能区上的某些控件取决于是否建立 Exchange 连接。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我很确定 Outlook 在功能区方面就像 Word 或 Excel,也就是说,您只需一次即可加载它,仅此而已,更糟糕的是,在加载功能区时,通常会出现应用程序的元素尚未启动(Internet 连接很可能是 Outlook 中的连接,尽管我对此不确定)。
更好的策略是使用插件所需的所有控件填充功能区,然后根据需要隐藏或禁用某些控件。
然后使用计时器或其他 Outlook 生成的事件,稍后检查连接状态并启用或禁用(或隐藏/显示)此时的适用控件。
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.