Cilvic
Cilvic

Reputation: 3447

How to add a group to a (VBA) custom ribbon without xmlns/idQ?

Situation:

Complication:

Any idea how we could achieve adding buttons?

We can request changes to the non-managed/VBA add-in.

Upvotes: 3

Views: 1801

Answers (3)

Cilvic
Cilvic

Reputation: 3447

In addition to Steve's answer we've discovered that VBA add-ins have a default namespace even when none is specified in their customUI.

You can extract the namespace by adding a control from the ribbon to the Quick Access and then exporting the UI Customizations. The resulting file should show:

<mso:cmd app="PowerPoint" dt="1" />
<mso:customUI xmlns:x1="C:\Users\USERNAME\AppData\Roaming\Microsoft\AddIns\Addin.ppam">

So the default namespace seems to be the complete Path to the add-in.

Upvotes: 6

Steve Rindsberg
Steve Rindsberg

Reputation: 14809

VBA add-ins don't have their own namespace by default, but can have one. If you create a custom namespace, then multiple VBA add-ins can share the same tab on the ribbon, for example.

<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui"
xmlns:nsMySpace="SomeName">

Then to create a new tab that other add-ins can share:

<tab idQ="nsMySpace:MySpace_Tab" label="MyTabLabel">

Upvotes: 7

Eugene Astafiev
Eugene Astafiev

Reputation: 49395

From a high perspective two add-ins can share a ribbon tab for controls because they are loaded into a single PowerPoint instance. When you develop a macro enabled file with a custom UI - only this file can be opened at the same time. But two add-ins can be run for the file/template. That's why idQ is intended to use by add-ins.

You can read more about the Fluent UI (Ribbon UI) in the following series of articles in MSDN:

Upvotes: 1

Related Questions