Search code examples
vbaexcelms-wordribbonpowerpoint

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


Situation:

  • Users have an existing custom ribbon that is added via a .PPAM (combination of VBA macros and Ribbon customization XML).
  • We want to add a group to that custom ribbon via our managed COM add-in
  • For custom ribbons from other managed COM add-ins this is feasible via the xmlns:foo="bar" & idQ that can be extracted from the customUI Link

Complication:

  • Custom Ribbons from non-managed add-ins seem to have no xmlns namespace, they do not show up in the customUI
  • Even via PowerPoint/Office the user can not customize those ribbons.

Any idea how we could achieve adding buttons?

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


Solution

  • 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">