Question

I'm trying to create an Outlook 2010 addin that adds a new tab to the ribbon. I found out how I can add my groups to an existing tab by setting the OfficeId to "TabMail" or something built-in, but I don't want to modify existing tabs.

I've now set the OfficeId that something of my own ("TabMyAddin"), but it doesn't show up in Outlook. I wonder if I need to somehow tell Outlook to add it and show it, or how I would proceed?

The RibbonType was changed to Microsoft.Outlook.Explorer if that matters.

Was it helpful?

Solution

Okay, got it:

  • In the Visual Ribbon Designer, the ControlId property needs to be set to "Custom" instead of Office. When set to Office, it will set idMso to the given OfficeId and when set to Custom, it will instead set the id.
  • In the XML Ribbon Designer, the <tab> needs to have an id instead of an idMso.

OTHER TIPS

The only way that I can get it to work is by setting the ControlID to custom and changing the RibbonType to Microsoft.Outlook.Explorer.

you can add tab in outlook, just using following steps :

1) Go to project and click on add item.

2) you will see following screenenter image description here

3) paste following code in thisAddin.cs file

 protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()

 {
  return new Ribbon1();
 }

4) Open the Ribbon1.xml file . You will see ribbon tab control code. you can change tab name , group name in xml under ribbon node

<tabs>
  <tab idMso="TabAddIns" label="tab name">  // your tab name
    <group id="MyGroup"
           label="My Group">
    </group>
  </tab>
</tabs>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top