从这里使用自定义 UI 编辑器:http:
//openxmldeveloper.org/blog/b/openxmldeveloper/archive/2010/08/10/23248.aspx
这里有一个微软指南:http:
//msdn.microsoft.com/en-us/library/ee691832 (v=office.14).aspx
在实际对宏和功能区进行编码时,请避免对名称进行硬编码,它会完美运行。这是我在一个宏文件中使用的代码示例:
<?xml version="1.0" encoding="utf-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon>
<tabs>
<tab id="refunds" label="Refunds/Returns" >
<group id="financeRefund" label="Refunds & Returns" >
<button id="refresh" visible="true" size="large"
label="Refresh Front Page" keytip="R"
screentip="Refresh the frontpage without clearing the data in the data sheet."
onAction="refreshfp" imageMso="RecurrenceEdit" />
<button id="new" visible="true" size="large"
label="Update Data" keytip="S"
screentip="Pulls in new data from the live sheet, clearing any changes made to the current data sheet."
onAction="updateData"
imageMso="ExportSharePointList" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
希望这可以帮助