I have created an extensive macro project which I would like to make available to my colleagues. For better usability, I would like to do this as an add-in with its own ribbon. When creating the customUI file, I used this answer as a guide, as I also use a work computer and only have limited rights. I also compared to this answer, which is basically the same but a bit newer.
Unfortunately, the ribbon I created is not displayed and I don't get an error. I have added the customizations to my file both saved as .xlsm
as well as .xlam
, both without success. I have tried to debug using these instructions, but get no error or even a hint.
Here is my customUI/customUI.xml
file:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="false">
<tabs>
<tab id="CustomTab" label="smartVC">
<group id="StkAnal" label="Strukturanalyse">
<button id="Btn1" label="Analyse" screentip="FPS-OPS abgleichen" supertip="Strukturen analysieren und abgleichen" size="large" imageMso="SmartArtOrganizationChartRightHanging" onAction="abgleich" />
</group>
<group id="Nav" label="Navigation">
<button id="Btn2" label="prev loc" screentip="Vorheriges loc KMAT" supertip="Zum vorherigen loc KMAT springen" size="medium" imageMso="ShapeUpArrow" onAction="prev_loc" />
<button id="Btn3" label="next loc" screentip="Nächstes loc KMAT" supertip="Zum nächsten loc KMAT springen" size="medium" imageMso="ShapeDownArrow" onAction="next_loc" />
<button id="Btn4" label="in FPS" screentip="Zeige KMAT in FPS" supertip="Zum entsprechenden FPS KMAT springen" size="medium" imageMso="LeftArrow2" onAction="find_in_FPS" />
<button id="Btn5" label="in OPS" screentip="Zeige KMAT in OPS" supertip="Zum entsprechenden OPS KMAT springen" size="medium" imageMso="RightArrow2" onAction="find_in_OPS" />
</group>
<group id="Format" label="Formatierung">
<button id="Btn6" label="EA" screentip="Markiert als EA" supertip="Zelle orangenen Rahmen hinzufügen" size="medium" imageMso="QueryAppend" onAction="mark_ea" />
<button id="Btn7" label="ST" screentip="EA Markierung entfernen" supertip="Zellenrahmen entfernen" size="medium" imageMso="QueryDelete" onAction="unmark_ea" />
<button id="Btn8" label="func" screentip="färben als func KMAT" supertip="Zellenfarbe Hellblau setzen" size="medium" imageMso="AppointmentColor2" onAction="mark_func" />
<button id="Btn9" label="loc" screentip="färben als loc KMAT" supertip="Zellenfarbe Dunkelgrau setzen" size="medium" imageMso="JotInkStyle1" onAction="mark_loc" />
<button id="Btn10" label="neu" screentip="markieren als neues KMAT" supertip="Zellenfarbe Gelb setzen" size="medium" imageMso="AppointmentColor10" onAction="mark_new" />
<button id="Btn11" label="del" screentip="KMAT zum löschen markieren" supertip="Zellenfarbe Rot setzen" size="medium" imageMso="InkStopInkingReadingView" onAction="mark_del" />
<button id="Btn12" label="todo" screentip="KMAT zum bearbeiten markieren" supertip="Zellenfarbe Hellgrau setzen" size="medium" imageMso="AppointmentColor4" onAction="mark_todo" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
... and the corresponding .rels
file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>
<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/>
<Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties" Target="docProps/custom.xml"/>
<Relationship Id="smartVCribbon" Type="http://schemas.microsoft.com/office/2006/relationships/ui/extensibility" Target="/customUI/customUI14.xml" />
</Relationships>
I am using Excel O365 and have installed a custom add-in which I do not have access to the code. However, I can create custom ribbons directly in Excel.
My questions are:
I loaded your RibbonX into the "Office RibbonX Editor" and it immediately highlighted the issue: the size
attribute can be either large
or normal
per 2.3.10 ST_Size (Control Size) and you are using medium
. As such, the RibbonX load process is failing. Where you use medium
, try changing all to normal
(or large
).