Is it possible to add new items into built-in RibbonGallery control in Outlook

124 Views Asked by At

Is there any way to add new buttons into the existing Move to folder dropdown (Gallery control with idMso="MoveToFolderGallery") in Outlook VSTO addin? I was able to find Group containing it, and hide it with

    <group idMso="GroupMoveActions" visible="false">

    </group>

and add the same Move gallery to my group with changed name

      <gallery idMso="MoveToFolderGallery" size="large"
               label="zzz">
        <button id="b1" label="My button"/>
      </gallery>

But the button I have added does not appear (when I do the same with my own gallery, it appear). Maybe there is a way to get RibbonGallery instance for the existing gallery and modify Items collection? https://learn.microsoft.com/en-us/dotnet/api/microsoft.office.tools.ribbon.ribbongallery.items?view=vsto-2017

1

There are 1 best solutions below

1
Eugene Astafiev On

You can't modify built-in controls. But you can add controls into your own custom UI (or just rebuild the whole ribbon from scratch) where you can add additional items.

Read more about the Fluent UI (aka Ribbon UI) in the following series of articles: