none
Limitations of customizing a VSTO Ribbon at runtime for Outlook 2010 RRS feed

  • Question

  • Hello!

    I'm creating my own Ribbon for use with Outlook 2010 (and 2012) using VS2012. My question is, what am I limited to editing at runtime with regards to the ribbon? My searching has yielded some results but only that of populating a RibbonComboBox, RibbonDropDown and RibbonGallery. I would like to edit the image of a button, for example, but I haven't found examples of this.

    I am new to VSTO development and I have been using the Designer view to create the basic look and feel. I understand there is a lot done for you this way (using the Designer view) but is it at all restricting in what it will let me do?

    Anyways, upon a state change for a RibbonButton/RibbonToggleButton, I may want to change the button image to something more relevant. Is this possible?

    Many thanks,

    Alex

    • Edited by Shmaff Thursday, May 16, 2013 9:10 PM
    Thursday, May 16, 2013 9:05 PM

Answers

  • I rarely use the ribbon designer but if you use ribbon XML to provision the ribbon you can change images by using an Invalidate() or InvalidateControl() command and using a getImage() callback in your ribbon XML. That way your callback is called and you can check a persisted variable that records the state of a toggle button for example. At that time you can provision the button with whatever image you want.
     
    As far as adding controls at runtime you're out of luck except for something like a dynamicMenu object.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "Shmaff" <=?utf-8?B?U2htYWZm?=> wrote in message news:5ca7cd50-401b-4624-8774-78871a216136...

    Hello!

    I'm creating my own Ribbon for use with Outlook 2010 (and 2012) using VS2012. My question is, what am I limited to editing at runtime with regards to the ribbon? My searching has yielded some results but only that of populating a RibbonComboBox, RibbonDropDown and RibbonGallery. I would like to edit the image of a button, for example, but I haven't found examples of this.

    I am new to VSTO development and I have been using the Designer view to create the basic look and feel. I understand there is a lot done for you this way (using the Designer view) but is it at all restricting in what it will let me do?

    Anyways, upon a state change for a RibbonButton/RibbonToggleButton, I may want to change the button image to something more relevant. Is this possible?

    Many thanks,

    Alex


    Ken Slovak MVP - Outlook
    Friday, May 17, 2013 6:05 PM
    Moderator