Is it possible to "flash" a button in the Office ribbon?

Answered Is it possible to "flash" a button in the Office ribbon?

  • Thursday, August 09, 2012 4:48 PM
     
     

    I'm developing an office add-in, and I'd like to be able to make a button "flash" to bring the user's attention to it.  I've seen built-in ribbon controls do this (eg.  The big office button in Excel 2007).  

    Is there any way to do this, barring something hideous like changing the button's image on a timer or something?

    Thanks

All Replies

  • Saturday, August 11, 2012 12:34 PM
     
     

    Unfortunately, no. You may be talking about setting focus to the control, which highlights it/makes it flash, or you may mean a different effect, but either way....not possible without doing 'something hideous'.

    One hideous way I can think of is UI Automation. This is an API designed to help individuals with disabilities access Microsoft software. Using it, you can set focus to controls, which will highlight them/make them flash depending on the version of Office.
  • Monday, August 13, 2012 6:03 PM
     
     

    Too bad.  I'll look into the IAccessibility interface.  If it turns something good up I'll post it.

    Thanks,

  • Monday, August 13, 2012 7:37 PM
     
     Answered

    I found it tricky to learn. I recommend using UI Spy to initially identify the names/hierarchy of elements.

    Also, if you're trying to do this for a ribbon control, my experience was that I could only access controls on the current tab of the Ribbon (though I've only done it once, so could be mistaken; also it may vary for different versions of Office). If that is the case: if you're using Office 2010 you can probably change the tab with an Activate command (assuming you're using an AddIn), but with Office 2007 you would need to use SendKeys and send the keyboard shortcut.