How to create user generated button in Ribbon xml RRS feed

  • Question

  • I am using VS 2008 and programming with

    I have created a ribbon xml add-in for Excel 2007.  I want to allow the user to create their own button in a dynamic menu, but I'm unsure how to begin.

    Here is more detail:  The user will create a worksheet template...the user will click the "Save Template" button that is programmed on to the ribbon...this will pop-up a form that asks for the file/button name they want to apply to this template...the user enters the name into the forms text box and clicks the "Save" button...the template is then saved in the default folder.  This much I have worked out, and it is working fine.........Now for the part I can't figure out:  After the user clicks the "Save" button on the form, and the worksheet is saved to the default folder, I want this "Save" button click event to also add a new button into Dynamic Menu1 on MyRibbon1...the label on the button should be the text the user entered into the forms text box...this new button should link back to the saved template file and be able to add that template to any workbook.  I know how to add the worksheet to any active workbook...what I don't know is:

    1.  How to dynamically create the new button.

    2.  How to dynamically link that button back to the saved template.

    Any assistance would be greatly appreciated...

    Wednesday, April 18, 2012 10:37 PM


All replies