Avatar of Jamie Garroch (MVP)
Jamie Garroch (MVP)
Flag for United Kingdom of Great Britain and Northern Ireland asked on

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

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>

Open in new window


Is it possible to use idQ/xmlns in this way to duplicate copies of controls in the same customUI definition?
Microsoft OfficeUI/UXMicrosoft PowerPointMicrosoft Excel

Avatar of undefined
Last Comment
Jamie Garroch (MVP)

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Jamie Garroch (MVP)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes