2011-09-13 1 views
0

J'ai placé mon propre ruban dans Outlook 2007 à un certain endroit. Mais quand je cours le code pour Outlook 2010 le ruban n'est pas là où je le veux comme 2007. Il a été placé à la dernière position. Existe-t-il une solution à ça?Gestion du ruban en C# pour Outlook 2010

+0

C# et le framework 3.5 .net –

+0

wpf ou winforms? –

+0

J'utilise des winforms –

Répondre

1

de Les ID de groupe sont différents dans Outlook 2007 et Outlook 2010. Tout d'abord, comprendre si elle est Outlook 2007 ou 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." 

Ensuite, utiliser le bon ID pour la version d'Outlook. Vous pouvez télécharger une feuille de calcul avec tous les ID de Microsoft au http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=3582

Questions connexes