这是一种情况:我用一些按钮为 Office(Word、Excel、PowerPoint)创建了自己的功能区。功能区是用 C#、VSTO、XML(不是 Designer)创建的。所以在所有这些程序中都有一个新的功能区,其中有一个功能区组,我的按钮在哪里。唯一的异常(exception)是 Excel,其中有一个“自定义工具栏”组在第一名,我的组在第二名。最好的部分是这个“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>
最佳答案
关于excel - 如何使用 VSTO 在 Excel 中的自定义 xml 功能区中禁用其他工具栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32243955/