gpt4 book ai didi

Excel CustomUI 功能区放置在另一个 CustomUI 功能区选项卡旁边

转载 作者:行者123 更新时间:2023-12-04 20:29:20 26 4
gpt4 key购买 nike

我在 excel 上有两个自定义色带,我无法将它们组合起来。我想让它总是在另一个自定义选项卡“之前”或“之后”。但我不知道如何对 XML 进行编程来实现这一点。

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="OnCustomUILoaded">
<ribbon startFromScratch="false">
<tabs>
<tab id="CustomTab" label="MyTab" insertAfterMso="OtherCustomTab">
***********************
</tab>
</tabs>
</ribbon>
</customUI>

无论“otherCustomTab”位于何处,这都会将我的“customTab”放在最后。

我玩过 insertAfterQ="OtherCustomTab" ,但这做同样的事情(无论“otherCustomTab”位于何处,都将“customTab”放在最后)。

最佳答案

在玩了很多次之后,我想通了。我有一个虚拟功能区,这是其中的一个 XML 片段:

假丝带:

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" xmlns:x="ns" >
<ribbon>
<tabs>
<tab idQ="x:SettingsTab" label="SettingsTab" insertBeforeMso="TabHome" visible="false" >
</tab>
</tabs>
</ribbon>
</customUI>

主功能区:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" xmlns:x="ns" onLoad="OnCustomUILoaded">
<ribbon startFromScratch="false">
<tabs>
<tab id="CustomTab" getLabel="GetLabel" insertAfterQ="x:SettingsTab" >
***************
</tab>
</tabs>
</ribbon>
</customUI>

最主要的是确保在主功能区之前调用虚拟功能区。

这种方法的好处是我可以拥有 8 或 9 个不同的虚拟功能区 .xlam 工作簿,每个工作簿都有不同的“insertBeforeMso”或“Ins​​ertAfterMso”。然后我可以简单地将虚拟功能区 .xlam 工作簿放入 XLSTART 文件夹,主功能区将根据我放入的虚拟功能区轻松更改位置。

关于Excel CustomUI 功能区放置在另一个 CustomUI 功能区选项卡旁边,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53009245/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com