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,maybe they are for merging two tab and group but not for 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?