Simple Ribbon Example Posted
I posted a new Excel 2007 tip today: Add The Speech Controls To The Ribbon.
It describes an add-in ( available for download) that creates a new group on the Review tab of the ribbon. This group contains the five text-to-speech controls that -- for some reason -- were omitted from the UI. In addition, the ribbon group contains a custom button that displays the Speech Properties dialog box. This dialog box lets you choose a voice and set the speed.
Writing the RibbonX code was straightforward, but it still took me many save-and-test cycles before I got it right. Here's what it looks like:
For the record, I had to consult my Excel 2007 Power Programming With VBA book several times when working on this project.
The most difficult part was writing the VBA code to display the Speech Properties dialog. This simple task required about 70 lines of code, including four API functions. As it turns out the sapi.cpl file is not located in the same place as the other Control Panel apps. Therefore, you need to consult the registry to find the location of the file. At least that's the conclusion I came to. If there's a simpler way, please let me know.
Spreadsheet Page Blog
Welcome to the Spreadsheet Page Blog. This is where you find the latest news on my books, add-ins, and other Excel-related topics. Comments are welcome.
