Ribbon handling in c# for outlook 2010
I have placed my own ribbon in Outlook 2007 at a certain location. But when I run the code for outlook 2010 ribbon is not there where I want it like 2007. It 开发者_开发问答has been placed at last position. Is there any solution for this?
The Group ID's are different in Outlook 2007 and Outlook 2010. First, figure out if it's Outlook 2007 or 2010:
using Outlook = Microsoft.Office.Interop.Outlook;
Outlook.Application thisApp = new
Outlook.Application();
string outlookVersion = thisApp.Version;
if (outlookVersion.StartsWith("12."))
// it's probably Outlook 2007
// Outlook 2010 should start with "14."
Next, use the right ID for the version of Outlook. You can download spreadsheet with all the ID's from Microsoft at http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=3582
精彩评论