将自定义按钮组添加到 Outlook 中的主页功能区 - VSTO 项目
Add custom button group to Home ribbon in outlook - VSTO project
我是 VSTO 的新手 development.I 我正在使用 visual studio 2017 社区 edition.I 需要在 outlook.I 的主页功能区中将两个按钮作为一个组显示功能区控件,但它显示为一个新的 tab.I 想要在主页功能区本身中将按钮显示为一个组
您的控件显示在新选项卡中,因为您指定了自己的 id
选项卡。要在现有选项卡中显示您的组,您需要指定此选项卡的 id
。 id
属性在本例中称为 idMso
。对于主资源管理器选项卡,idMso
是 TabHome
。您的 ribbon.xml
可能看起来像 ...
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon>
<tabs>
<tab idMso="TabHome">
<group id="SampleGroup" label="Sample Group">
<button id="Button" label="Sample Button" size="large" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
如果您仍然对自己感到困惑,那么开始自定义 Office Ribbon XML is to read 3 parts of Customizing the 2007 Office Fluent Ribbon for Developers 的好方法。
我是 VSTO 的新手 development.I 我正在使用 visual studio 2017 社区 edition.I 需要在 outlook.I 的主页功能区中将两个按钮作为一个组显示功能区控件,但它显示为一个新的 tab.I 想要在主页功能区本身中将按钮显示为一个组
您的控件显示在新选项卡中,因为您指定了自己的 id
选项卡。要在现有选项卡中显示您的组,您需要指定此选项卡的 id
。 id
属性在本例中称为 idMso
。对于主资源管理器选项卡,idMso
是 TabHome
。您的 ribbon.xml
可能看起来像 ...
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon>
<tabs>
<tab idMso="TabHome">
<group id="SampleGroup" label="Sample Group">
<button id="Button" label="Sample Button" size="large" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
如果您仍然对自己感到困惑,那么开始自定义 Office Ribbon XML is to read 3 parts of Customizing the 2007 Office Fluent Ribbon for Developers 的好方法。