I\'m working on a Word 2007 app-level add-in. So far, I haven\'t experienced major obstacles except for converting the add-in\'s Ribbon interface to XML. I have to use Ribbo
When working with Ribbon XML, I tried this but I couldn't access the Ribbon1 property from the Globals.Ribbons.. The property simple wasn't there..
However, I came up with another solution which basically had to do with a proper type cast.
In ThisAddIn.cs:
private Microsoft.Office.Core.IRibbonExtensibility ribbonObj;
protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()
{
ribbonObj = new Ribbon1(this);
return ribbonObj;
}
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
// Calling the public method TEST() in Ribbon1.cs
//MyNameSpace is the namespace used in your project ie., your project name
((MyNameSpace.Ribbon1)ribbonObj).TEST();
// Calling the public variable flag in Ribbon1.cs
((MyNameSpace.Ribbon1)ribbonObj).flag;
}