none
Is there any way to load ribbon dynamically RRS feed

  • Question

  • Can i load different ribbons based on document?.

    i will set keys in document custom Properties, as per those key i want to load different ribbons, on Loading each document. Is this possible ? i dont want to use HIDE/SHOW method

     

    Monday, August 8, 2011 7:41 AM

Answers

  • Hi Rosh

    If you're talking about using an Add-in to provide the Ribbon, then the only way would be to load an add-in. You could, for example, have a "manager add-in" that's always loaded. When a document is opened, based on whatever criteria you use, load another add-in. That add-in CAN load its Ribbon dynamically, based on the criteria. When the document is closed (or the user switches to another document) unload the add-in (and load it again for the other document). Admittedly, this might be a bit slow, but it's the only possibility.

    An alternative would be to use document-based Ribbons, which would mean having at least a "kernel" VBA project to call your managed code. You could, for example, attach a document to a specific document template that contains the Ribbon and the "VBA kernel".


    Cindy Meister, VSTO/Word MVP
    Monday, August 8, 2011 7:51 AM
    Moderator