O'Reilly logo

RibbonX: Customizing the Office 2007 Ribbon by Teresa Hennig, Ken Puls, Robert Martin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix E. RibbonX Naming Conventions

To help you avoid confusion when writing callbacks in a VBA project, we devised an easy-to-follow naming convention for your RibbonX objects. When naming objects, you can, of course, follow your own whims — but when other people need to interpret your code, following a standard style can make life a whole lot easier for everyone. Additionally, naming conventions can minimize conflicts when sharing customizations or moving them to additional projects. Moreover, you'll definitely appreciate having used naming conventions when you later have to interpret and modify code that you wrote months or years before.

We do not expect you to blindly follow the recommendations laid out here. Rather, we are sharing our advice with the hope that it guides you to make prudent choices that not only make it easier to create customizations, but also avoid conflicts and make it a lot easier and less frustrating when it comes time to interpret and share your customizations.

How Our Naming System Works

The naming convention we devised is based on the Reddick naming convention.

Note

A description of the Reddick convention (RVBA) can be found at www.xoc.net/standards/rvbanc.asp.

Our convention also includes parts from VBA and throws in the naming of attributes from the XML Schema for the Ribbon. Therefore, our naming convention includes an identifier for the Ribbon, the control, and the action to be invoked.

Thus, you when you have a button control and want to use the onAction ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required