PDA

View Full Version : Two add-ins for one custom ribbon tab



gabethegrape
05-07-2009, 09:32 PM
I have multiple excel add-ins that I want showing up in a custom ribbon drop down menu. I can easily add the first item to the menu, but the second one creates another ribbon tab by the same name. Can I merge them? How?
Thanks.

Bob Phillips
05-08-2009, 03:20 AM
Did you declare a shared namespace?



<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
xmlns:Q="Shared Namespace">

gabethegrape
05-08-2009, 10:19 AM
Thanks for your reply. I've got it to the point where the second xlam appears within the drop down menu of the first using the following XML for both. However, the image does not appear when I change menu id to idQ. If I change the idQ back to id, or if I change custom image to imageMso, it works fine. Is there a better way to do this so that I can use my custom image?

First Add-in:


<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
xmlns:x="myNameSpace">

<ribbon>
<tabs>
<tab idQ="x:GabeTab" label="RehabCalcs" insertAfterMso="Add-Ins">

<group id="customGroup1" label="Prescription">
<button id="customButton1" size="large" onAction="OpenCalc" image="Rx2" />
</group>

<group idQ="x:customGroup2" label="Exercises">
<menu idQ="x:MyDropdownMenu" size="large" image="Ex2" >
<button id="customButton2" label="Postures" onAction="Postures" />
</menu>
</group>

<group idQ="x:customGroup3" label="Assessment">
<menu idQ="x:MyDropdownMenu2" size="large" image="Ax2" >
<button id="customButton3" label="Ax1Button" onAction="Macro1" />
</menu>
</group>

</tab>
</tabs>
</ribbon>

Second Add-in:


<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
xmlns:x="myNameSpace">

<ribbon>
<tabs>
<tab idQ="x:GabeTab" label="RehabCalcs" insertAfterMso="Add-Ins">

<group idQ="x:customGroup2" label="Exercises">
<menu idQ="x:MyDropdownMenu" size="large" image="Ex2" >
<button id="customButton4" label="Two" onAction="Postures2" />
</menu>
</group>

<group idQ="x:customGroup3" label="Assessment">
<menu idQ="x:MyDropdownMenu2" size="large" image="Ax2" >
<button id="customButton5" label="Yup" onAction="Macro2" />
</menu>
</group>

</tab>
</tabs>
</ribbon>
</customUI>