【发布时间】:2016-07-11 15:34:04
【问题描述】:
这是一种情况:我用一些按钮为 Office(Word、Excel、PowerPoint)创建了自己的功能区。功能区是用 C#、VSTO、XML(不是 Designer)创建的。所以在所有这些程序中都有一个新的功能区,其中有一个功能区组,我的按钮在哪里。唯一的例外是 Excel,其中有一个“自定义工具栏”组位于第 1 位,我的组位于第 2 位。最好的部分是这个“Cutsom 工具栏”不会出现在我安装了我的插件的每台计算机上。 我的问题:这个“自定义工具栏”如何显示在我创建的新功能区上,有什么方法可以禁用它? 功能区代码:
<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
<ribbon startFromScratch="false">
<tabs>
<tab idMso="TabAddIns" label="MyAddIn">
<group id="GroupInclude" label="MyAddIn">
<button id="saveMyAddIn" label="Save my file" getImage="imageButton" size="large"
onAction="saveMyAddInButton" getEnabled="GetEnabled"
/>
<button id="configurMyAddIn" label="MyAddIn Options" getImage="imageButton"
onAction="configureMyAddInButton"
/>
<button id="goToMyAddIn" label="Go to MyAddIn" getImage="imageButton"
onAction="goToMyAddInButton"
/>
<button id="aboutMyAddIn" label="About MyAddIn" getImage="imageButton"
onAction="aboutMyAddInButton"
/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
【问题讨论】: