我有一个要添加自定义ribbonX 按钮的xlam 文件。
我使用自定义 UI 编辑器,并使用这个 xml 它“工作”。
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon>
<tabs>
<tab id="Tab1" label="LeaveReport">
<group id="Group1" label="Formatering">
<button id="Button1" imageMso="ChartSwitchRowColumn" size="large"/ >
</group>
</tab>
</tabs>
</ribbon>
</customUI>
但是,如果我添加 onaction 以使按钮执行某些操作,它根本不会加载。这意味着选项卡和按钮根本不存在。
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon>
<tabs>
<tab id="Tab1" label="LeaveReport">
<group id="Group1" label="Formatering">
<button id="Button1" imageMso="ChartSwitchRowColumn" size="large"/ onAction="formatera_for_pivot_tabell()"/ >
</group>
</tab>
</tabs>
</ribbon>
</customUI>
我也试过没有()
.
我在这里做错了什么?没有动作的按钮是没用的:-/