[RESOLVED] Enable a button on Custom Ribbon from VSTO
Hi,
I have a VSTO Excel application and I have created a custom ribbon.
This is applied as below.
Code:
public partial class ThisWorkbook
{
protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()
{
return new ReportsRibbon();
}
private void ThisWorkbook_Startup(object sender, System.EventArgs e)
{
try
{
However from my workbook I want to be able to set one of the buttons as enabled or disabled. How do I access these properties?
Re: Enable a button on Custom Ribbon from VSTO
http://msdn.microsoft.com/library/aa722523
It looks from this that I should be able to get the enabled property, although I dont know how to pass it the control but I can see nothing about setting the enabled property.
Re: Enable a button on Custom Ribbon from VSTO
I came across these two great articles which helped a lot.
http://www.rondebruin.nl/hidevisible.htm
http://www.mrexcel.com/forum/showthread.php?t=472222
however
in VSTO c# the callback is like below
Code:
public bool Audience_getEnabled(Office.IRibbonControl control)
{
return g_blnEnabled;
}