I want to begin using the IRibbonUI and IRibbonControl objects but I do not know how to get started.


I was thinking maybe something like

[vba]Dim theRibbon as IRibbonUI

set theRibbon=activedocument.Ribbon
'or
set theRibbon=application.Ribbon[/vba]

I know that that does not exist, but how do I set the ribbon control to the current ribbon?




The web is full of articles about how to create a custom ribbon or modify the ribbon. I do not want to do any of that I just want to work with the current ribbon.


When I am done, I will do something like this





[vba]For each ribControl in theRibbon
debug.print ribControl.id
next RibControl
[/vba]


So, in Word, Excel, or PowerPoint, how do I set a reference to the current ribbon?