|
Book Review
Authors: Robert Martin, Ken Puls, Teresa Hennig, Oliver Stohr
Published by Wiley Publishing
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470191112,descCd-description.html


The more serious you are about customizing the Office 2007
Ribbon, the more you'll like this valuable, comprehensive, authoritative, but
occasionally frustrating book. The flow of information in the book isn't always
from the simple to the complex, and some of the chapters are less well written
than others (about which, more later), but the authors have succeeded in giving
you everything you need in order to take charge of the user experience within
Access 2007, Excel 2007, and Word 2007.
The authors don't merely explain ribbon customizations and
then declare themselves done. They recognize that ribbon customizations would
be nearly useless if they weren't backed by appropriate automation routines and
by deployment methods that comply with Office security requirements. As a
result, they go to considerable extra effort to provide introductory and
advanced chapters on Visual Basic for Applications (VBA) programming, plus a
chapter on deployment of customizations and also a chapter on Office security.
The book devotes a separate chapter to each of the various
types of controls found on the Ribbon. These include basic controls (buttons,
checkboxes, edit boxes, toggle buttons), combobox/dropdown controls, custom
pictures/galleries, menus, and controls that the authors refer to as
"formatting" elements (boxes, groups, labels, separators). Each of
these chapters is organized in the same way. Element names, attribute names,
and allowed values are fully documented, as are the VB/VBA callback signatures
for dynamic attributes. Best of all, each chapter includes examples of RibbonX
code and VBA routines for accomplishing something useful with each type of
control.
One of the most helpful chapters in the book is devoted to
working with contextual controls, i.e., controls presented to the user only in
certain contexts, such as when a particular type of object is selected within
the host application. This chapter covers techniques for controlling the
visibility of ribbon tabs, groups, and individual controls, and it shows how to
enable or disable these items when their visibility can't be controlled. The
chapter even demonstrates how to supplement contextual ribbon controls with
contextual command bars (right-click menus). Superb!
The introductory VBA chapter covers the VBA editor,
subroutines, functions, object models, branching structures, arrays, and
debugging. The advanced VBA chapter provides valuable tips for working with
collections, working with classes, working with web services, creating custom
properties for built-in objects, and saving and retrieving registry values-all
of which can be exploited when customizing the ribbon.
The book's appendices include lists of RibbonX tags, idMso
names for built-in tabs and groups, imageMso names for images on built-in
ribbon controls, and key tips and accelerator keys. Also included are an
appendix that lists suggested naming conventions and another that lists
additional resources on the web.
Readers who are new to XML and/or to the RibbonX vocabulary
and/or to the new Office XML file formats will experience some frustration when
trying to decipher the first three chapters and parts of later chapters. In all
cases, the information such readers need is there, but some of it isn't well
organized, and some of it isn't well written. The book's first example of
RibbonX isn't as simple as it could have been, and some of the simplest
customizations (including disabling built-in controls) are held back until
Chapter 13, where they are characterized as "advanced" concepts.
The chapter on "Accessing the User Interface
Customization Layer" of the new Office XML file formats fails to explain
what happens when an Office 2007 application opens an Office XML file. (The key
steps are these: The application looks inside the zip-format XML file structure
for a folder called _rels, and then looks inside that folder for a file called
.rels, and then reads that file to find out where any customizations are
stored.) Instead, the chapter forces the reader to follow a tedious example in
order to discover the steps involved, and even then fails to spell out the
steps explicitly. At one point, the chapter tells the reader to "return to
the Custom UI editor to troubleshoot the XML code," despite the fact that
the reader hasn't been told at that point what the Custom UI editor is, where
to download it, or how to use it.
The chapter on callbacks fails to explain what happens when
an Office 2007 application loads a user interface customization into memory. (One
key step is this: The application reads the user interface element's
"onLoad" attribute and then makes a call to the routine whose name
has been assigned to that attribute.) Instead, the chapter simply tells the
reader that "you need to specify a value" for that attribute. A
reader with previous experience can make the necessary inference, but a reader
new to the subject matter might not be able to do so and in any case shouldn't
be required to do so.
The chapter on sharing and deploying ribbon customizations
is well conceived and well written, but it includes a number of errors. For
example, it says that "Any [ribbon] customizations stored in a template
will travel with the documents created on the template." (Not true in Word
2007.) The chapter makes a confusing distinction between "add-in"
templates and "global" templates in Word 2007. (By design in Word,
all add-in templates are global templates. The meaningful distinction is
between add-in templates loaded automatically at startup and those loaded later.)
The chapter says that you have to quit Word and move an add-in out of the
startup folder before you can edit it. (Not so. The add-in merely has to be
unloaded.) The chapter says, "You cannot deactivate templates [in Word] as
easily as in Excel. Word has no such option." (Not true. On the Developer
tab, simply choose Document Template and then remove the checkmark next to the
add-in template.)
The techniques described in the book can be employed by any
user of Office without recourse to specialized programming tools other than XML
Notepad and the Custom UI editor, both of which can be downloaded from
Microsoft at no cost. So, if customizing the Office 2007 Ribbon is your goal,
and if you have the patience to read and then reread some passages of the book
along the way, then you will find in it everything you need in order to
accomplish your goal.

|