This page last revised:
26 Sep 2024 13:06:46 -0400
.
Modifying the QAT in Word 2007-2021 (365)
See also,
Microsoft Office Quick Access Toolbar - short video by BCTI - this may
be all you need but please do read below on other places to save your
customizations
See also Modifying the QAT and Ribbon in
Microsoft Word. The Quick Access Toolbar (QAT) provides for easy
addition of commands to every editing screen in Word. QAT
customizations can be stored in any template or document using Word itself
or in a special file. QAT modifications that refer to something that is
stored in a template or document are best stored in that template or
document.
Here is
Microsoft's support page on modifying the QAT in case you want to
look at it. Not all of the information on it is correct, though. For
instance, it says you cannot get a Styles dropdown on the QAT. Take a
look at my Styles
QAT Add-In or my
2003
WordArt Add-In to see several. The page also talks about icons for
custom groups on the QAT without discussing how you get such groups to
be there at all. It makes no mention of the ability to store
modifications in particular templates or documents, either. (More
samples are linked below.)
The Quick Access Toolbar lets you make changes and store those changes in
any template (or document) or globally. If in a document template, those
changes will apply to documents based on the template as well, even if the
document no longer remains "Attached" to that template! In this way, it is
like text in a document template. (Note, if the QAT modification is for a
macro stored in the template, the template must remain attached for the
macro to run.)
You can do this customization by right-clicking on the Ribbon and picking
the choice of Customize Quick Access Toolbar. (You can also use the drop-down at the right end of the QAT and choose "more
commands.")
If you do that, the default is to store the customization in the application
(all documents). This change is not stored in the normal template but in
a separate file. There is only one such template per user on a computer. If you
replace it, you replace all customizations to the QAT and, in recent versions,
to the Ribbon. Use the dialog instead.
The
Customize Quick Access toolbar has been removed from these menus in recent
versions. On the Windows version it can still be accessed though File > Options
as shown below. You can quickly get to this by right-clicking on any Ribbon Tab
and choosing Customize the Ribbon. Then shift one down in the Options tab to get
to Customize Quick Access Toolbar. You can also choose More Commands in the
dropdown at the right end of the QAT.
If you wish to store in a particular document or template, you must designate
that storage location. This is done in a window in the top right of the
modification dialog. You will have two choices: "For all documents" or whatever
the currently active template or document is. Note, one of the choices is not
the template attached to the currently open document. Nor can you choose
currently loaded global templates which are not open for editing nor other open
documents; only the currently active document or template (the one you would be
typing in if you were not modifying the QAT). The attached template is not an
option.
Word 2010 QAT Modification Menu (shown above)
The window on the right will show modifications stored in the
template or document. If the default is chosen, it will show the ones stored
there. If the template/document being edited is chosen, it will show the choices
stored in that file.
Generally there are limited images available for the icons
on the QAT. If you copy a command from the Ribbon, it will come with an
image; that image generally cannot be modified from within Word. If you choose a command not
on the Ribbon or a macro, you can usually modify the icon by choosing from a
limited set. If you want more than that, you are going to have to do some
XML modification of the Ribbon. This is going to take either a customization
of the QAT modification file or creating custom ribbon tab(s) with the
images as noted above.
If you want to customize QAT images, I recommend starting
with Greg Maxey's page:
Modify QAT\Ribbon Button Images\Labels. Note that you can use these
techniques on the files that hold customizations directly. That is, they are
already xml files. You just need to change the extension to .txt to edit
them.
Note that the as far as I know, if you add a building blocks
gallery to the QAT, nothing about it can be modified.
You can display the QAT below the Ribbon or above it.
Generally below will let you have more on it and may have better icons. In
some versions of Word the number of icons displayed in the Title Bar (above
the Ribbon) is very limited.
Here is my current QAT as shown below the Ribbon. It
holds all of my icons on one line.
Here is the same QAT when displayed above the Ribbon.
Note the difference in the icon display and the number of icons shown.
(The rest of the icons are available in the above the
Ribbon version through the arrows at the end.)
The control for above or below is in the dropdown menu on
the right end of the QAT.
Important note: If you are adding macros to your QAT, the
QAT modification for that macro should be stored in the same template that
has the macro. That way, the QAT button will only show up when the macro is
available.
You can choose macros in "Choose Commands from" in the upper
left of the customize dialog. Recorded macros are always in the NewMacros
module, but that is probably not where you actually want to keep them. If
you are going to put the macro you want on your QAT in a different module,
do that before adding it to the QAT.
Macros stored in the normal template (default storage
location for recorded macros) will be in the "Normal" project. Those stored
in other templates will be in the "Template" or "TemplateProject" module. I
try to rename these modules to more meaningful names before putting macros
on the QAT.
When displayed in the QAT modification dialog, macros are
shown by their project, module, and name, in that order. This can make for
long names. For instance a macro that you record with the name MyMacro and
save in the default location will show up in the list as
Normal.NewMacros.MyMacro. Note that you can resize the dialog itself. You
may need to make it wider to find your macros.
Here are screenshots from the (resized) dialog to modify the
QAT and from the VBA Editor (Alt+F11) for the corresponding macros.
Note in the lower left of the VBA Editor screenshot the
"Property" Name. This is where you change the names of projects or modules
in VBA.
Macros
not in Normal.dotm - To access macros not in
Normal.dotm, the template or document holding the macros must be open for
editing and be the ActiveDocument in vba jargon. This should be fine,
because that is the template that should hold the QAT customization, anyway.
Unless QAT customizations are stored in a particular
document or template, they are stored in the Word.qat (Word
2007) or Word.OfficeUI (Office 2010-21/365) files. These are the
default storage files. Note these customizations are not stored in
the Normal template. Word
2010 - Word 2021 will use the same file but using both versions has been
reported to
scramble the order in which QAT modifications are displayed. While you can
store QAT modifications elsewhere, you cannot change the default storage
locations.
Beginning in the year 2018, the Word.OfficeUI file
also stores ribbon modifications.
These default files are stored in the following location:
In Windows XP C:\Documents and Settings\ user name
\Application Data\Microsoft\Office
In Windows Vista or in Windows 7/8/10/11 C:\Users\ user name
\AppData\Local\Microsoft\Office
On a Mac, I suspect the location is
/Users/<Your Login Name>/Library/Containers/com.microsoft.Word/Data/Library/Preferences or ~/Library/Application
Support/Microsoft/Office
Office 2013-2021/365 shares the QAT file with Office 2010 (same name and
location).
Default QAT Files: If the modification is only for
your personal use and you do not care if you can move it to another computer
or a new version of Word, you can store it in the default location. This is
certainly the easiest place to store a modification, short term. I will
sometimes store modifications there if I make them for a single Word
session. I also remove the standard QAT entries from the default files and
put them in a custom global template instead so they are there, in the
same place, on all systems that use that global, without duplication.
Document or Template: My preference is to store QAT
additions in a template. To store a QAT addition in a
template, that template must be open for editing. One
might assume that you can also store modifications in the attached template
for an open document; that assumption would be wrong, though. The template,
itself, must be open for editing. This means storing the modifications in a
template generally requires the extra step of opening the template itself. This includes the Normal.dotm template!
Note that if stored in a document template, the modification
does not transfer to a document based on the template. It is
available so long as the template containing the modification remains
attached to the document but won't be there if you send the document to
someone else. If stored in the document, it will travel with the document.
Global Template in Startup Folder: If it is to be
used in all documents, I will store it in a
Global Template
that is placed in the Word
Startup Folder.
If the template contains macros it must be a .dotm file in the Startup
Folder. If it contains no macros it may be a .dotx file. Again, if you want
to change QAT modifications stored in such a template, it must be open for
editing. This includes the Normal.dotm template!
QAT Links to Macros: If the modifications have to do
with macros, the macros and the QAT modifications should be stored in the
same .dotm template. (In earlier versions of Word, this would be toolbars
rather than QAT modifications.)
QAT Links to Galleries Stored in Templates: If the
QAT modification has to do with a gallery stored in a custom template
(global or document) the QAT modification should be stored in the same
template.
Document Template: If the modification is for use
with a particular
document
template and its attached documents, the modifications should be stored in that template.
Document: In rare cases, I put a QAT modification in
a document. I generally do this if the modification is for use only with
that document or if I intend to share the document with someone who would
not have the template that contains the QAT modification and I want that
someone to be able to use the modification. Again, this is rare; I mention
it because it is possible to do.
Removing QAT entries: If multiple files are used to
hold Quick Access Toolbar modifications, those modifications are cumulative. If a QAT entry is in any file,
especially the Word.qat or Word.OfficeUI file, it cannot be removed from the
QAT in a different file, at least not through the Word Interface. That is,
if you want to remove a standard QAT entry, that change must be stored in
the storage location where the entry is kept. You can do this with the
default storage locations from any document. For entries stored elsewhere,
the storage location must be open for editing and the "active document."
Here are some free sample
templates that hold QAT modifications. Feel free to download them to use
or just for ideas on what can be done.
The Word Interface gives limited ability to modify icons and the text
displayed when you hover the mouse pointer over the icon. This comes from
the Modify button which is active when you have selected QAT item. The
selection of icons is limited and some commands cannot be modified using
this method. In the Fall of 2023, Microsoft introduced changes to the UI
which included an option for Text labels in the QAT. This is discussed
later
on this page.
When you add your custom feature to the QAT, if it also has a
Keyboard Shortcut that will activate it, you can include that shortcut
with the display text. This is the norm with built-in features. If you have
created a keyboard shortcut for a macro, it is important that the shortcut,
like the QAT modification, be in the same file that contains the macro. Here
are examples of built-in features on the QAT showing shortcut alternatives.
This can be done directly through the user interface in Word.
Greg Maxey has an excellent page on this which shows methods that have
much more power and flexibility than is available directly in the Word
interface. That modification is not done through
the user interface directly; modification involves writing XML without the
need for also writing vba callbacks. Using XML, you can change the Icon, the
Label and add a "supertip" of additional text.
Again, to modify QAT customizations stored in a document or template you
must follow the steps outlined to unpack the XML of the document or template. There are
directions given in the last link on how to do that. To modify
customizations stored in Word.qat, Word.OfficeUI, or
Word14.CustomUI you need to change the extension to .txt. My
recommendation would be to append the .txt extension (Word.qat.txt,
Word.OfficeUI.txt, Word14.CustomUI.txt,
Word16.CustomUI.txt) to make
it easy to change back. I always work on a copy or with a copy so that if I
make an error, I can return to my starting point.
You can also do this through full-blown ribbon modification with vba
callbacks but the QAT is one of the more difficult areas to modify in a full
ribbon modification and is one of the easier areas to make flexible
modifications through the UI. (Your author has not attempted the
modification with callbacks,
being able to get what is needed through simply modifying the XML.)
Adding Ribbon Groups to the QAT
With the advent of changes to the interface in Word 2016, the QAT is more
spread out, making it harder to fit everything on the QAT, especially in a
single row. It is also possible to add "Groups" from any Ribbon tab. To do
this, right-click on the group and choose to add. If done in a template with
a custom ribbon with one of your custom groups, the QAT customization will
be stored in the template. The image shows up as the blank circle. That
image can also be changed. You can also add a label and supertip.
Modify Quick Access Toolbar (QAT) Button Image or Text
When you add something to your QAT, by default it will be placed on the
right end of the toolbar. In the Modify the QAT dialog that would be the
bottom of the list. You can move things up and down in that list, which
moves them to the right or left on the toolbar. If you have more icons than
fit on your screen in one row, a more button with two triangles appears at
the far right. When you press that button, a second row of icons may appear.
If that does not hold all of the icons in your QAT, the second row can be
scrolled right and left when active.
If you use the default file as your storage location and use both
Word 2010 and 2013, they use the same file and Word 2013 likes to scramble
the icons. It does not do this if you store the toolbar modifications in a
separate template. I have not noticed this with Word 2016 and 2010.
If you have modifications stored in multiple files they will be loaded
onto the toolbar in groups by file. Those in the default file will be on the
far left, followed by those in other files according to the alphabetical
order of the holding Add-In files.
General order:
Icons in the default customization file
Icons in global templates other than normal (in alphabetical order
by template name)
Icons in the normal template
Icons in the current document's attached template
Icons in the current document
For example:A
Default file holds icons A, B, X, Z in that order.
Global Holder file SomeIcons.dotx holds icons E, P, U, M in that
order.
Normal.dotm holds icons Q, J, N in that
order
Global Holder file MyIcons.dotx holds icons F, H, L, C in that order.
The icons will appear on the toolbar as:
A, B, X, Z, F, H, L, C,
E, P, U, M, Q, J, N
This is true even if MyIcons.dotx is loaded as an Add-In after
SomeIcons.dotx.
If you use multiple files to hold icons, the separator character can be
especially helpful in marking groups of icons on the toolbar. This is
available on the dialog as <Separator>.
Again, if both Word 2010 and 2013 are active on the same computer, use of
Word 2013 can scramble the order of icons in the default file Word.OfficeUI.
I've noticed this when Word 2013 is used to modify the QAT. I do not know
whether Word 2016 does this.
If in the above example, you also had icons D, R, and N stored in a
document template named ATemplate.dotx (rather than an Add-In) and that
template is attached to the active document, the order would be:
A, B, X, Z, F, H, L, C,
E, P, U, M, Q, J, N, D, R, N
The icons get added to the right end of the toolbar without regard to the
name of the containing document template. That is, if an icon is added to a
document's attached template, it will appear on the far right
end of the QAT, behind those stored in global templates. Any stored in the
document, itself, will display at the end.
I do not recommend this because it stores your modification in the
general file rather than in a specific customization template. Nevertheless,
if you are just doing it for yourself, it works.
Right-click on any command on the Ribbon and tell Word to put it on the
QAT.
This will copy both the command and the related icon to the QAT. This is
true whether it is a Ribbon Tab command built into Word or on a customized
Ribbon Tab. Again, it will store it in the general store for QAT
customizations.
Better Way - Use the More Commands method and store it in a custom
template.
This is especially true if you are talking about customized commands that
are already in a template like macros. You want to store those commands in
the same template that holds your other customizations. To do this, you must
have that template open for editing on your screen.
See Modifying Text and Icons above. Once you
have the Customize the Quick Access Toolbar dialog open, you can select any
available ribbon tabs and copy commands from that tab onto the QAT attached
to the open template.
The screenshot above is for a custom tab. Note that this is storing the
modifications in the file that holds the custom tab. If you only want
commands on the QAT, it is possible to modify the custom tab in XML to make
it not visible. The QAT icons will remain active and available.
If, instead of just right-clicking on the Ribbon, you
right-click on a particular command or button on the Ribbon, you get an
option to Add that Command to the QAT. The dialog below is from Word 2010
with a custom Ribbon tab.
The option to Customize the Ribbon... does not appear in
Word 2007. If you choose to Add to the Quick Access Toolbar the command will
be placed in the next available spot and stored in the general QAT
customizations. If you choose Customize the Quick Access Toolbar, you will
have the ability to position the command you are adding and choose where to
store the customizations. For a simple demonstration of the power and
limitations of adding a button to the QAT in a template/document, see
Send as PDF button in Word Body.
You can easily add a Ribbon tab group or a Building Blocks gallery to the QAT if it is
already on a Ribbon tab.
To add something already on a Ribbon to the QAT right-click
on it and select Add to Quick Access Toolbar or (better) use the Modify the
QAT dialog.
It is also possible to add custom menus that are not Galleries, but that
involves XML modification of the Ribbon and transferring that to the QAT.
Here is a sample from my QAT.
Getting it on the custom Ribbon tab is not simple but is something that can
be done. Transferring it from that tab to the QAT is as simple as putting
anything else on the Ribbon on the QAT. The background on such a menu can be
found at
Dynamic Ribbon Menu by Greg Maxey. Again, though, anything that is
already on the Ribbon can be easily put on a QAT. This is true even if the
Ribbon tab, itself, is hidden.
You can easily create a keyboard shortcut for a Building Block or AutoText.
See
my article on shortcuts or my
page on Building Blocks. However, you cannot put a single
building block on the QAT. However, you can put a Gallery, including a
custom Gallery on the QAT. Unfortunately, you cannot modify the icon for
such a gallery. My
WordArt Add-In uses such a gallery on the QAT. For information on how to
create a custom Gallery and display it on the QAT, see
Build & Deploy Custom Building Block Galleries by Greg Maxey.
You could have a macro that inserts a single Building Block and put that
macro on the QAT but that seems like overdoing it. You can simply use the
AutoComplete feature in Word to insert from the keyboard. You can also
use a
Building Blocks Gallery Content Control to insert a custom menu of
Building Blocks into a document.
Changes in the QAT Appearance/Size since
Word 2010
The QAT since Word 2007 has always been a single row with the ability to
show one more row with a mouse click at the end. However, how much it will
hold has diminished since Word 2010. Here is a comparison with the same QAT.
Everything fits on one row in Word 2010 and in Word 2013 in mouse mode.
Othewise, it is wrapped.
Word 2013 introduced touch mode to spread ribbon buttons and QAT icons.
Even in Mouse Mode, though, the icons are larger and there is not room for
as many. Word 2016 is substantially bigger/wider, even in mouse mode. Word
2016 - 2019 also added the AutoSave button as nearly mandatory, taking more
real estate. With regular icons/buttons there is room in Word 2010 for
57 icons. In Word 2016-19 room for only 27 when in touch mode!
If you feel that the mouse mode at least should go back to Word 2010 size
and spacing, you can vote and comment on
the Feedback Hub.
Touch Mode changes the Ribbon as well as the QAT. See
this page for more.
In 2021 the "New Experience" made the icons larger and even more apart.
The AutoSave and Save buttons are moved to the Title Bar. This is applied to
Word 2016-2021 and 365, also on Windows 11.
Sometime in early 2022, Microsoft introduced the "New Experience" to
Office users. This became non-optional for Word 2016 and later in the Fall
of 2023.
If you are seeing these labels and do not want them, you can
use the drop-down at the right end of the QAT to hide them.
If you want to get rid of the Visual Refresh Preview / New Experience (or turn it on)
you need to modify the registry. The procedure is described in my May 12,
2024, comment in
my article about the New Experience / Visual Refresh Preview in Word. If
you do revert to the older UI, you lose the ability to use Text Command
Labels. (To me, this is no loss.)
In 2021, Office added the ability to hide the QAT. You can get it back by
using the Ribbon hide menu. This is in versions of Word using the "New
Experience" or "Visual Refresh Preview." In this, the default is to have the
QAT not displayed!
(You can hide it using the dropdown at the right end of the QAT.)
It does not appear that modifications to the QAT on the Mac can be
assigned to specific documents or templates as they can in Windows.
I do not know what happens on the Mac if you open a document
that has a customized QAT created in Windows. I suspect that it will work,
at least with Word's built in commands.
I have it on good authority that, as of May 2020, in the Mac
versions, the icons on the QAT cannot be modified by XML modification.
I am sometimes asked what my QAT looks like. Here is how it looked in Word
2013.
The actual QAT is a single line, cut here for display purposes. Many of the
"tooltips" are shown. The "QAT help" inverted exclamation point opens a document
about many of the modifications and their sources. This QAT is
generated from at least 5 different global templates. Only the first two icons
are in the default storage file. The containing files have documentation about
what each icon does.
Here is the QAT in 2021, largely unchanged through multiple versions of Word.
Again, the bulk of this is not stored in the default files but in my own
templates. That is part of what makes it easy to transfer. I removed some of the
default commands like Save and SaveAs because I use keyboard shortcuts from them
rather than the Mouse.
Here is a macro-free
template with both Ribbon and QAT modification. The Ribbon modifications
were made using the Custom UI Editor. The QAT modifications were made first
through the interface. Then those changes were tweaked in XML. The code is given
in the template. I do the vast bulk of any modifications that I do in the User
Interface, saving to my own templates, but sometimes the XML method is needed.
As you may be able to tell, this page is a work in progress. As I learn more, I'll share it
here, time allowing.
Charles Kenyon
07 September 2024.
Changes / suggestions / ideas can be sent to
Charles
Kenyon.
Many people visit this site and use the information it
contains.
It costs money to keep on line and effort to update.
If you have
received assistance here
please consider making a donation if you can.