在Outlook 365上使用功能区的命令栏 [英] Commandbar to ribbon on outlook 365
问题描述
我们正在从outlook 2010迁移到Outlook 365加载项,其中一个问题是对命令栏id的引用似乎不再起作用,因为当前代码执行了id 7095 SendAndReceiveAll按钮。引用返回null并使用outlookspy
在Outlook 365中不再显示id,但在outlook 2010标准中存在。
当前执行此按钮的代码是
_sendReceiveAllCmdBarCtrl =((Outlook.Explorer)mapiNamespace.Application.ActiveExplorer())。CommandBars.FindControl(1,7095,Missing.Value,Missing。价值);
_sendReceiveAllCmdBarCtrl.Execute();
现在从我早期的了解是这个已更改为使用Fluent功能区,但我将如何获得相同的结果或一些好的文档来开始理解功能区。
您好,
如果控件ID不可用,您可以使用 CommandBars.ExecuteMso Method(Office)
你可以下载来自 Office 2016帮助文件:Office Fluent用户界面控件标识符 以获取所有可用控件的idMso。
要执行SendAndReceiveAll按钮,请使用
((Outlook.Explorer)mapiNamespace.Application.ActiveExplorer())。CommandBars .ExecuteMso(" SendReceiveAll");要使用流畅的功能区,您可以使用
IRibbonUI.InvalidateControlMso Method(Office)以使内置控件无效。
有关自定义流畅用户界面的详细信息,请访问
为开发人员自定义2007 Office Fluent功能区(部分1 of 3)
为开发人员自定义2007 Office Fluent功能区(部分2 of 3)
为开发人员自定义2007 Office Fluent功能区(部分3 of 3)
问候,
Celeste
We are migrating from outlook 2010 to Outlook 365 Add-In and one of the issues is the reference to commandbar id do not seem to work anymore as the current code executes id 7095 SendAndReceiveAll button. The reference comes back null and using outlookspy the id's no longer are visible in outlook 365 but exist in outlook 2010 standard.
The code that currently executes this button is
_sendReceiveAllCmdBarCtrl = ((Outlook.Explorer)mapiNamespace.Application.ActiveExplorer()).CommandBars.FindControl(1, 7095, Missing.Value, Missing.Value);
_sendReceiveAllCmdBarCtrl.Execute();
Now from my early knowledge is that this has changed to use the Fluent Ribbon, but how would I acheive the same result or some good documentation to start to understand the ribbon.
Hello,
If the control id is not available, you could use CommandBars.ExecuteMso Method (Office)
You could download from Office 2016 Help Files: Office Fluent User Interface Control Identifiers to get the idMso of all available controls.
To execute SendAndReceiveAll button, please use
((Outlook.Explorer)mapiNamespace.Application.ActiveExplorer()).CommandBars.ExecuteMso("SendReceiveAll");To use fluent ribbon, you could use IRibbonUI.InvalidateControlMso Method (Office) to invalidate a built-in control.
For more information about customizing fluent UI, please visit
Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
Customizing a Ribbon for Outlook
Extending the User Interface in Outlook 2010
Regards,
Celeste
这篇关于在Outlook 365上使用功能区的命令栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!