Wiley
Wiley.com
Print this page Share

RibbonX: Customizing the Office 2007 Ribbon

ISBN: 978-0-470-19111-8
688 pages
January 2008
RibbonX: Customizing the Office 2007 Ribbon (0470191112) cover image
  • As the most radical change to the Office interface in its history, the Ribbon replaces the traditional menu bar and toolbars and requires a new set of skills for customizing
  • Instructions and examples demonstrate how to customize the Ribbon using VBA, XML, Access, Excel, and Word
  • Covers the relevant aspects of security, such as trust centers and digital certificates
  • Packed with real-world code examples that readers can immediately apply
  • Features helpful references
See More
Introduction.

Part I: The Building Blocks for a Successful Customization.

Chapter 1: An Introduction to the Office User Interface.

Chapter 2: Accessing the UI Customization Layer.

Chapter 3: Understanding XML.

Chapter 4: Introducing Visual Basic for Applications (VBA).

Chapter 5: Callbacks: The Key to Adding Functionality to Your Custom UI.

Chapter 6: RibbonX Basic Controls.

Chapter 7: comboBox and dropDown Controls.

Chapter 8: Custom Pictures and Galleries.

Chapter 9: Creating Menus.

Chapter 10: Formatting Elements.

Chapter 11: Using Controls and Attributes to Help Your Users.

Part II: Advanced Concepts in Ribbon Customization.

Chapter 12: Advanced VBA Techniques.

Chapter 13: Overriding Built-in Controls in the Ribbon.

Chapter 14: Customizing the Office Menu and the QAT.

Chapter 15: Working with Contextual Controls.

Chapter 16: Sharing and Deploying Ribbon Customizations.

Chapter 17: Security In Microsoft Office.

Appendix A: Tables of RibbonX Tags.

Appendix B: Tables of Tab and Group idMso Names.

Appendix C: imageMso Reference Guide.

Appendix D: Keytips and Accelerator keys.

Appendix E: RibbonX Naming Conventions.

Appendix F: Where to Find Help.

Index.

See More
Robert Martin is an Excel MVP and Microsoft Certified Professional. With a background in finance, he has worked as an IT director for an investment bank in the UK, and worked on charitable projects in Africa before turning to authoring on MS Office development.

Ken Puls is an Excel MVP and a Certified Management Accountant in Canada. He works as the Controller of a resort, teaches Excel courses, and has authored all of the articles at the www.excelguru.ca website.

Teresa Hennig is an Access MVP and president of the Pacific Northwest Access Developer Group and the Seattle Access Group. She is the lead author of the Access VBA Programmer's Reference series and is a lead on three national committees for INETA. Her company, Data Dynamics Northwest, provides data management solutions and consulting services.

See More
Download TitleSizeDownload
Code Download
This file contains all the code, samples, and examples from RibbonX: Customizing the Office 2007 Ribbon.
(Note that chapter 17 and Appendixes A, D, E, and F have no download materials.)
6.02 MB Click to Download
Error in Figure 6-14
The figure was incorrectly identified in the write-up to REUSE fig 6-10, it SHOULD have indicated to use fig 6-14.

28.58 KB Click to Download
Image, page 217
Second bullet details: While Microsoft may not have a built in method to test a CustomView, it doesn't mean that we can't come up with a way to do it. One method I've used in many solutions is to create a CustomDocumentProperty in the workbook.
You'd then need to modify the rxtglHideExpense_Click callback to write to the CustomDocumentProperty each time the button is clicked to record the appropriate state.
Since this is saved with the workbook, you can then use the Workbook_Open event to check the state of the CustomDocument property. You could then pass this value to the getPressed routine to ensure that the state is set correctly.
The code to create it looks similar to the following:

Dim sDocPropName As String
Dim DocProps As DocumentProperties

sDocPropName = "ButtonPressed"

Set DocProps = ActiveWorkbook.CustomDocumentProperties
DocProps.Add Name:=sDocPropName, _
LinkToContent:=False, _
Type:=msoPropertyTypeBoolean, _
Value:= '<--pass a TRUE or FALSE value here

You would then query the value with:
Dim sDocPropName As String
Dim DocProps As DocumentProperties

sDocPropName = "ButtonPressed"

returnedVal = ActiveWorkbook.CustomDocumentProperties(sDocPropName)

And write to it with:
ActiveWorkbook.CustomDocumentProperties(sDocPropName) = pressed

16.32 KB Click to Download
See More

Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.

ChapterPageDetailsDatePrint Run
186 Error in Text
"Parent Objects of the button Element"

SHOULD BE:

"Parent Objects of the checkBox element".
05/28/2008
210 Error in Table 6-14
Table 6-14:

The VBA callback signature should be:
Sub OnAction(control as IRibbonControl, pressed as Boolean)
02/28/2008
217 Error in Code
While Microsoft may not have a built in method to test a CustomView, it doesn't mean that we can't come up with a way to do it. One method I've used in many solutions is to create a CustomDocumentProperty in the workbook. You'd then need to modify the rxtglHideExpense_Click callback to write to the CustomDocumentProperty each time the button is clicked to record the appropriate state. Since this is saved with the workbook, you can then use the Workbook_Open event to check the state of the CustomDocument property. You could then pass this value to the getPressed routine to ensure that the state is set correctly.
The code to create it looks similar to the following:
 
    Dim sDocPropName As String
    Dim DocProps As DocumentProperties
 
    sDocPropName = "ButtonPressed"
 
    Set DocProps = ActiveWorkbook.CustomDocumentProperties
    DocProps.Add Name:=sDocPropName, _
                 LinkToContent:=False, _
                 Type:=msoPropertyTypeBoolean, _
                 Value:= '<--pass a TRUE or FALSE value here
 
You would then query the value with:
    Dim sDocPropName As String
    Dim DocProps As DocumentProperties
 
    sDocPropName = "ButtonPressed"
 
    returnedVal = ActiveWorkbook.CustomDocumentProperties(sDocPropName)
 
And write to it with:
    ActiveWorkbook.CustomDocumentProperties(sDocPropName) = pressed

10/21/2010
217 Error in Text and Image
Missing image and text from page--see download in this chapter for page 217.
5/9/2011
367 Error in Code
the code from the top of the page

should be:
supertip="It tells you nothing...
which is exactly what this button does!"

Again, placing the within the screentip (as opposed to the supertip) will be ineffective.
09/09/08
See More

Related Titles

Back to Top