Vs2010 を使用しています -> 拡張性 -> 共有アドイン
Connect.cs ファイル
public class Connect : Object, Extensibility.IDTExtensibility2, IRibbonExtensibility
{
public string GetCustomUI(string RibbonID)
{
return MyResources.customUI;
}
}
リボンは、上記のコードを使用して作成されます。
私はクラスcustomRibbons.csを持っています
public class Create_Custom_Ribbons : IRibbonExtensibility
{
Outlook.Application applicationObject;
public Create_Custom_Ribbons(Outlook.Application application)
{
try
{
applicationObject = application;
GetCustomUI("");
}
catch(Exception ex)
{
MessageBox.Show(""+ex.StackTrace);
}
}
public string GetCustomUI(string RibbonID)
{
return MyResource.customUI;
}
}
および Connect.cs で
public void OnStartupComplete(ref System.Array custom)
{
try
{
customRibbons.Create_Custom_Ribbons cu = new
customRibbons.Create_Custom_Ribbons(applicationObject);
}
catch (Exception ex)
{
MessageBox.Show("" + ex.StackTrace);
}
}
しかし、リボンが作成されていません。何が間違っているのか、またはこれを達成するための他の方法を教えてください。作成されていないことを理解できません。