Notice how the menu separators have been used and how Group3 forms a submenu of
Group2. Also, notice that a disabled button with a label made up of spaces has been placed
between Group1 and Group2 to provide a spacer. This makes the menu structure look better.
Currently, there is no code for all your actions, so none of the menu items will do anything
except produce errors.
You can use the Custom UI Editor to generate your callback code. In the Editor, click the
Generate Callbacks icon on the right-hand side of the toolbar. This will generate the
following VBA code:
'Callback for id 1 onAction
Sub Action 1 (control as IRibbonControl)
End Sub
'Callback for id 2 onAction
Sub Action 2 (control as IRibbonControl)
End Sub
Chapter 38: Creating Menu Structures with the Ribbon 347
Figure 38-1 The MyMenu ribbon