troubleshooting Question

How to use idQ/xmlns in Office ribbon fluent customUI to make duplicate instances of custom controls

Avatar of Jamie Garroch (MVP)
Jamie Garroch (MVP)Flag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft OfficeMicrosoft ExcelMicrosoft PowerPointUI/UX
1 Comment1 Solution109 ViewsLast Modified:
I would like to avoid having to create duplicate copies of a custom ribbon control that I want to appear in multiple places in the Office UI and instead create it once and then use the qualified control id mechanism instead. I know how to use idQ to create a shared group across multiple add-ins but can it be used to share a control within the same add-in?

The example below has a custom namespace defined as mns. I then create a group containing the first instance of my control, a button with id ButtonTest and a second instance using idQ but it doesn't work.

<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" xmlns:mns="MyNameSpace">
    <ribbon>
        <tabs>
            <tab id="TabTest" label="Test">
                <group id="GroupTest1" label="Test 1">
 			<button id="ButtonTest" label="Button 1" onAction="OnAction"/>
                </group>
                <group id="GroupTest2" label="Test 2">
 			<button idQ="mns:ButtonTest"/>
                </group>
            </tab>
        </tabs>
    </ribbon>
</customUI>

Is it possible to use idQ/xmlns in this way to duplicate copies of controls in the same customUI definition?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros