0
votes

My outlook 2010 add-in needs one custom button in the context menu of mail items and two custom ribbons (one for new mail message and another for message read).

To get the custom menu working, i used this:

protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()
{
    return new crmContextMenu(); //my custom context menu
}

but when i do this, the other ribbons won't show up. Then i tried the other override:

protected override Microsoft.Office.Tools.Ribbon.IRibbonExtension[] CreateRibbonObjects()
    {
        Microsoft.Office.Tools.Ribbon.IRibbonExtension crmCM = new crmContextMenu() as Microsoft.Office.Tools.Ribbon.IRibbonExtension;
        return new Microsoft.Office.Tools.Ribbon.IRibbonExtension[] { new ReadRibbon(), new ComposeRibbon(), crmCM };
    }

and the custom context menu doesn't show up. How exactly can i have them to "coexist"? Thank you

1

1 Answers

0
votes

Never mind, i got around it exporting the ribbons made in the designer to XML and using the GetCustomUI() -> GetResourceText() method.