C# – Outlook VSTO ribbon to home tabControlId

cms-officeoutlookvsto

I'm writing a VSTO Microsoft Outlook plug-in. The version destination of that plugin is Outlook 2007 and 2010, so I use the Outlook 2007 add-in (in Visual Studio).

I have some (visual) problem with ActiveMenuBar. In Outlook 2007 it works fine, but in 2010 the ActiveMenuBar doesn't exist; it is replaced with tabControl and ribbons.

I would like to check the version (Application.Version) and if the version is 14 (Outlook 2010) then don't add an item into ActiveMenuBar, but add a ribbon to the Home tabPage.

How do I add the Ribbon into the Home tab page? For example, if I add a ribbon to the Message tab page, I set the ribbonControl.OfficeId to "TabReadMessage", but I can't find the OfficeId of the Home tab.

Best Answer

Set the 'ControlId' property (ribbon designer properties) or the idMso (ribbon XML) to TabHome (Edit: TabMail in Outlook 2010 and Outlook 2013). The ribbongroups on your ribbon will then be added to the existing Home ribbon.

A complete list of all other ribbon names can be found in 2007 Office System Document: Lists of Control IDs and in Office 2010 Help Files: Office Fluent User Interface Control Identifiers.

Related Topic