1

enter image description hereI want to hide the "Power Pivot" menu item for a specific document. (the reason - When I sent it out, I don't want users to have the ability to go into "manage measures...")

I know how to use the customUI14.xml to hide menu items such as home, data

<tab idMso="TabHome" visible="false"/>  
<tab idMso="TabData"  visible="false"/>

I did find out that the Power Pivot is not a built in Excel menu item.

It is part of the "Application.COMAddIns" collection and called "Microsoft Power Pivot for Excel".

However, I didn't find any way to disable it or make it invisible with the ribbonX XML, the same easy way as we would disable a Home or Data tab. Any ideas?

Is there a way to disable an add-in through the XML?

Thanks for your help!

GoofyMan
  • 31
  • 3

1 Answers1

1

There are basically two main ways to find the control's idMso value:

  1. The straightforward way is to search for the control ID in the list of controls IDs.

  2. Another possible solution is to search for the required control in the Excel options dialog:

    options dialog in excel

    Where you could hover over any control from the list and check its ID in the popup window.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • Thanks Eugene. I tried both: In the menu i didn't find it. In the mouse hovering it says: Measures (Custom Control) – GoofyMan Apr 17 '23 at 21:03
  • After spending few hours, I found out that the "power pivot" is not a standard menu item with an idMSo. it is part of the "Application.COMAddIns" collection and called "Microsoft Power Pivot for Excel". However, I didn't find any way to disable it or make it invisible with the ribbonX XML, the same easy way as we would disable a Home or Data tab. Any ideas? – GoofyMan Apr 18 '23 at 01:13
  • 1
    In that case only the add-in vendor/developer can provide you with a public method which you may call to get the job done. There is no trivial way to disable third-party controls on the ribbon. – Eugene Astafiev Apr 18 '23 at 08:33
  • I was thinking about it and maybe for my issue this workaround will do it. I tried and it did what I want but I am not sure yet if there are any side effects: clear the entire ribbon, and then rebuilt their menu items. It will only affect this one document. .... – GoofyMan Apr 18 '23 at 14:57
  • Yes, there is not so much you could do with custom ribbon UI unfortunately. – Eugene Astafiev Apr 18 '23 at 15:22