Create custom Ribbon button if idMSO fails

Add-in Express™ Support Service
That's what is more important than anything else

Create custom Ribbon button if idMSO fails
 
Ken Puls




Posts: 10
Joined: 2014-12-17
And after even further testing, I realized that I must of have OK to All on those 2016 queries. The following errors occur:

-PowerQueryGetTransformDataMenu
-PowerQueryGetTransformDataMenuSubscription19
-ShowQueriesAndConnections

In other words, all the 2019 and higher versions. But on O365, everything loads gracefully.

I've now modified my calls to just add the button for "PowerQueryManageWorkbookQueries" to get the 2016 button correct, and am using my callback to set it to hidden if the "ShowQueriesAndConnections" menu exists.

Is there any way to "only create this ribbon button if this condition is true"? Like I say, I'd love to have a way to do this right through your Ribbon UI builder. That would be fantastic.
Ken Puls, FCPA, FCMA, MS MVP
Posted 01 May, 2020 13:25:41 Top
Andrei Smolin


Add-in Express team


Posts: 17438
Joined: 2006-05-11
Hello Ken,

Microsoft doesn't provide a way to determine the version of Excel used or I can't find it.

Ken Puls writes:
Is there any way to "only create this ribbon button if this condition is true"?


See the OnRibbonBeforeCreate event of the add-in module. In this event you can modify the set of Ribbon controls before Add-in Express handles the whole set.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 04 May, 2020 01:52:32 Top