Ribbon getImage Callback

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

Ribbon getImage Callback
Change ImageMSO Dynamically  
Andrei Smolin


Add-in Express team


Posts: 18267
Joined: 2006-05-11
Hello Mark,

I was going to write code specifying and handling the getImageMso callback and found that Office throws a warning when the callback is specified in the Ribbon XML. This is when I understood the problem.

You want to change ImageMso on the fly. This is impossible to achieve because the Office Ribbon schema does not support this. Say, they write at https://docs.microsoft.com/en-us/openspecs/office_standards/ms-customui/846e8fb6-07d3-460b-816b-bcfae841c95b:

The getImage, image, and imageMso attributes are mutually exclusive. If none of these attributes are specified, no icon SHOULD be displayed.


Add-in Express supports this specification. Note that there's no getImageMso in that sentence. Actually, getImageMso is missing on that page. Also, I have a Ribbon schema file that I can't find on microsoft.com pages any longer: that file doesn't have getImageMso either.

I have to conclude that getImageMso mentioned at https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2007/aa338199(v=office.12) and https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2007/aa722523(v=office.12) is a mistake. There's a probability that it was available in Office 2007 and removed after that.

So, you can't change ImageMso at run time.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 02 Aug, 2021 06:36:22 Top