Results 1 to 3 of 3

Thread: [RESOLVED] Enable a button on Custom Ribbon from VSTO

  1. #1

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Resolved [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?

  2. #2

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    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.

  3. #3

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    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;
             }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width