none
How to use multiple XML ribbon in one Outlook VSTO Add in RRS feed

  • Question

  • I'm working with Outlook VSTO Add In and first I have added a Button(ribbon) to the TabMail and after that I need a custom context menu item on right click any Inbox item, So I have added another Ribbon, but inside CreateRibbonExtensibilityObject() I can return only one Ribbon.

    Inside ThisAddIn.cs

    protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()
    {
        return new Ribbon2();
    }

    I tried with some old unclear solution like below adding namespace, but it's not working and maybe they are for merging two tab and group not two different type ribbon.

    ContextMenuRibbon

    <?xml version="1.0" encoding="UTF-8"?>
     <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" 
      onLoad="Ribbon_Load" xmlns:x="MySpace.Outlook"> 
       <contextMenus>
        <contextMenu idMso="ContextMenuMailItem">
          <button
           id="MyContextMenuMailItem" label="ContextMenuMailItem" 
           idQ="MyRibbons"/>
       </contextMenu>
      </contextMenus> 
    </customUI> 

    How can I use both Ribbon in same Add In?

    Tuesday, February 12, 2019 2:03 PM