It took me a while to work out how to do this, so I'll post it here to save you the bother. ;-)

//GS - Get a hold of the menubar
Office.CommandBarControls cbc = 
    this.Application.CommandBars[1].Controls;

//GS - Create a new menu for our addin to use
Office.CommandBarPopup newMenu = 
    (Office.CommandBarPopup)cbc.Add(
        Office.MsoControlType.msoControlPopup, Type.Missing, 
            Type.Missing, cbc.Count, true);

//GS - Give the menu a sensible caption
newMenu.Caption = "&Model Input";

//GS - Add an item to the menu
Office.CommandBarButton menuItem =
    (Office.CommandBarButton)newMenu.Controls.Add(
        Office.MsoControlType.msoControlButton,
            Type.Missing, Type.Missing, Type.Missing, true);

//GS - Caption the menu item
menuItem.Caption = "&Open";

//GS - Wire up the click event
menuItem.Click += new Office.
    _CommandBarButtonEvents_ClickEventHandler(menuItem_Click);

Technorati Tags: ,