We are trying to put third-party add-in controls onto a custom ribbon via our add-in.
1) Customization via modifying the PowerPoint.officeUI is working:
<mso:customUI
xmlns:x1="ThirdPartyAddin"
xmlns:mso="http://schemas.microsoft.com/office/2009/07/customui">
<mso:ribbon>
<mso:qat/>
<mso:tabs>
<mso:tab id="my_new_tab" label="my_new_tab">
<mso:group id="Test" label="New Group" autoScale="true">
<mso:gallery idQ="x1:TheirFunction1" visible="true"/>
</mso:group>
</mso:tab>
</mso:tabs>
</mso:ribbon>
</mso:customUI>
We've extracted this xml by using File > Options > Ribbon Customization and inspecting the resulting PowerPoint.OfficeUI file.
2) Putting the below into our add-in code to be returned from IRibbonExtensibility.GetCustomUI also referred to as RibbonXML:
<mso:customUI
xmlns:x1="ThirdPartyAddin"
xmlns:mso="http://schemas.microsoft.com/office/2009/07/customui">
<mso:ribbon>
<mso:tabs>
<mso:tab id="my_new_tab" label="my_new_tab">
<mso:group id="Test" label="New Group" autoScale="true">
<mso:gallery idQ="x1:TheirFunction1" visible="true"/>
</mso:group>
</mso:tab>
</mso:tabs>
</mso:ribbon>
</mso:customUI>
Notes:
- With the mso:gallery In PowerPoint there are no UI XML error reports.
- We removed because the Quick Access Toolbar can't be modified that way.
- Instead of the gallery shown here I also tried with a button which is listed as mso:control in PowerPoint.officeUI but which I had to change into mso:button for GetCustomUI otherwise PowerPoint would complain "0x80004005 Custom Controls cannot be specified as < control >. Control type is required about ID x1:theirFunction2
Problem
The item does appear but it's not working. it has the little arrow for gallery but has no icon.
Observations
- Ironically one can right click it and add it to the Quick Access Toolbar, where it's working again.
unloading the third party add-in while having the GetCustomUI add-in loaded will result in a minor update of the control
Related Documentation
- From Cindy's comment I investigated "control" more appearantly there is a quite similar question, unfortunately the answer is unconfirmed: Can controls be clone
- Also this is documentation on the "control" MSDN