Welcome to Office Zealot Sign in | Join | Help
Outlook Ribbon IDs

With VSTO 2005 SE it is simple to get a custom ribbon up and running in Outlook. After the initial F5 moment of success, one of the first things you probably need to do is implement some way of showing your custom ribbon only for certain types of Inspector windows rather than showing it in every type of Inspector window. In order to do this, add logic to the GetCustomUI method. Specifically, examine the ribbonID string passed to this method and return custom ribbon XML only if the ribbonID corresponds to the ribbon ID of the Inspector that you want to modify. For example, to display a custom ribbon only when reading or composing mail do something like this:

public string GetCustomUI(string ribbonID)
{
   string ui = null;
   if (ribbonID == "Microsoft.Outlook.Mail.Read" || 
      ribbonID == "Microsoft.Outlook.Mail.Compose")
          ui = GetResourceText("OutlookRibbonExample.OutlookRibbon.xml");
   return ui;
}
 

Here is a list of the Ribbon IDs used by Outlook:

  • Microsoft.Outlook.Mail.Read
  • Microsoft.Outlook.Mail.Compose
  • Microsoft.Outlook.MeetingRequest.Read
  • Microsoft.Outlook.MeetingRequest.Send
  • Microsoft.Outlook.Appointment
  • Microsoft.Outlook.Contact
  • Microsoft.Outlook.Journal
  • Microsoft.Outlook.Task
  • Microsoft.Outlook.DistributionList
  • Microsoft.Outlook.Report
  • Microsoft.Outlook.Resend
  • Microsoft.Outlook.Response.Read
  • Microsoft.Outlook.Response.Compose
  • Microsoft.Outlook.Response.CounterPropose
  • Microsoft.Outlook.RSS
  • Microsoft.Outlook.Post.Read
  • Microsoft.Outlook.Post.Compose
  • Microsoft.Outlook.Sharing.Read
  • Microsoft.Outlook.Sharing.Compose

For more information check out the whitepaper "Customizing the Ribbon in Outlook 2007" on MSDN.

Posted: Monday, March 12, 2007 2:03 PM by hansen
Filed under: , ,

Comments

Waseem said:

Hi Dear!

Gooday for you...

i see you office development video on "How Do I: Use the Ribbon Designer to Customize the Ribbon in Outlook"

Use the Ribbon Designer to Customize the Ribbon in Outlook. you mention in you video add item ribon designer its not mention with my VS.NET 2005 i install all neccessary files like...

0. VSTO SE after that i install

1. VSTO_PTRibbonIDs

2. VSTO_PT

i can't see or add that ribbon designer in project.

Please reply me how can i add this designer..

thanks and best regards

# June 22, 2008 7:38 AM
Anonymous comments are disabled