Creating the XML Code ..........................................................................................
Table 15.1 lists some of the most commonly used XML elements for customizing an Access 2007
Ribbon.
TABLE 15.1
XML Elements for Use in Customizing the Ribbon
Element Name Usage Comments
customUI The top-level element for a custom Ribbon
ribbon The Ribbon definition Set the startFromScratch attribute to
“true”to create a new, blank Ribbon.
(The quotes are needed, a difference
from VBA code with its Trueand
Falsekeywords.) If set to “false”or
omitted, the customizations are applied
to the standard Ribbon.
tab Creates or references a Ribbon tab
group Creates or references a group on a tab
id Unique name of a custom control
idMso Name of a standard control
label Text displayed on a control
button A command button on a Ribbon The onActionattribute specifies the
name of a function to run when the
button is clicked.
dropDown A drop-down list Automatically limited to list selections.
comboBox A drop-down list that allows manual entries Users can enter selections or select from
the list.
imageMso The image to use for the control Set with the name of a built-in Ribbon
control (or a custom image you have
created).
size The size of the control The choices are “normal”and “large”.
supertip The text to display in the pop-up that appears
when your mouse hovers over a control
visible Whether the control is visible or not The choices are “true”or “false”.
enabled Whether the control is enabled or not The choices are “true”or “false”.
Element names in XML use camel-casing notation; the first letter of the element name is
lowercase, and other components have their first letter capitalized (giving the appear-
ance of a camel’s hump). Example: dropDown.
NOTENOTE
Part III Adding More Functionality to Office