Ribbon
Office fluent UI (user interface)
The term RibbonX is used to described the programmability mechanism for customising the Ribbon interface.
link - learn.microsoft.com/en-us/openspecs/office_standards/ms-customui/
link - learn.microsoft.com/en-us/previous-versions/office/developer/office-2010/ee691834(v=office.14)
link - learn.microsoft.com/en-us/previous-versions/office/developer/office-2010/gg469862(v=office.14)
link - learn.microsoft.com/en-us/previous-versions/office/developer/office-2007/aa338202(v=office.12)
link - learn.microsoft.com/en-us/previous-versions/office/developer/office-2007/aa338199(v=office.12)
link - learn.microsoft.com/en-us/previous-versions/office/developer/office-2007/aa722523(v=office.12)
link - learn.microsoft.com/en-us/previous-versions/office/developer/office-2007/dd756403(v=office.12)
link - learn.microsoft.com/en-us/windows/win32/windowsribbon/windowsribbon-templates
link - github.com/OfficeDev/office-fluent-ui-command-identifiers
Using VBA Code
Even though the customisations are defined at design-time most of the controls attributes can be modified at run-time using VBA.
A few of the controls can be totally dynamic so their structure as well as their attributes can be defined at run-time.
All the built-in controls are available for our and be overridden, executed and queried for their images, caption and so far.
Ampersand - &&(you need it twice) & [& #38;]
Forward Slash - / [& #47;]
Backward Slash - \ [& #92;]
New Line - [& #13;]
Apostrophe - ' [& apos;]
GetLabelMso
GetEnabledMso
GetVisibleMso
GetImageMso
InvalidateControl
IRibbonControl
The getImage callback can be passed either an idMso name or an Ipicture object to provide a built-in or custom image.
Namespaces
Add the customUI file
Before we can add the ribbon XML to this file you need to add the corresponding customui file.
It is this xml file that will contain the ribbon XML.
Right click on the entry and choose one of the following
Office 2010 Custom UI Part - Select this one if you are using Office 2010 or later (inserts customUI14.xml)
Office 2007 Custom UI Part - Select this one if you are using Office 2007 (inserts customUI.xml)
Suggestions
Every RibbonX container item should support having its contents set dynamically.
Both the RibbonX XML and any images in the file should be exposed through the workbook object's CustomXMLParts collection, so they can be easily read or updated from VBA
ExecuteMso should be able to take an optional itemID or ItemIndex parameter.
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopNext