One can access the Ribbon by using Commandbars("Ribbon") that will return an IAccessible object. You can access the tabs using the oleacc.dll library which can return an array of other IAccessible objects which are basically the list of all child elements. So the first child of the ribbon would be its tab. Using the IDs (which are strings) of these children objects you can filter in to the next child level which can be menu items etc.
Credit to Tony Jollans, Microsoft Word MVP for the ribbon demo that you can find at www.WordArticles.com
Here you can download a working example of how to activate a tab in either 2007 or 2010 versions of Excel. Note, for Excel 2010, MS has already incorporated the ActivateTab and ActivateTabMso methods, so one doesn't have to worry about elaborate codes to get the job done. The XML code used is given below
PHP Code:
<customUI onLoad="OLUIR" xmlns=http://schemas.microsoft.com/office/2006/01/customui>
<ribbon>
<tabs>
<tab id="tabAUniqueNameIDForMyNewTab" label="My New Tab" insertAfterMso="TabView">
</tab>
</tabs>
</ribbon>
</customUI>
Bookmarks