Adding to the Customize Command List

Office for Mere Mortals
Your beginners guide to the secrets of Microsoft Office
Invalid email address
Tips and help for Word, Excel, PowerPoint and Outlook from Microsoft Office experts.  Give it a try. You can unsubscribe at any time.  Office for Mere Mortals has been running for over 20 years, we've never, ever revealed or sold subscriber details.  Privacy policy

Why the Office command list isn’t comprehensive and how to add ‘missing’ items.

Our Command Finder list is the list supplied by Microsoft in the command customization dialog. We’ve provided an easier way to find that information but are limited to what Redmond has provided all Office users.

Not everything is exposed in the Customize command list. Some features and settings don’t get added to the command list according to reasoning that is hidden from us mere customers.

To add a ‘missing’ option to a ribbon or Quick Access Toolbar you have to first create a short VBA function and to make that function you need the right VBA command.

All Office features should be available via VBA methods or properties. You can find the VBA equivalent of a command or setting using the Record Macro feature. In short, turn on Remove Macro, do the thing or change the setting you want, turn off macro recording then look at the macro to see the VBA version of your actions.

For example, several readers have pointed to the Keep Track of Formatting setting under Word Options | Advanced | Editing. It’s not listed in the customize command list.

From the recorded macro you’d find that the true/false setting is:

Options.FormatScanning 
 

Turn that into a macro which reverses the current setting:

Sub FormatScanningToggle()
 Options.FormatScanning = Not Options.FormatScanning
 End Sub
 

Or a macro to make sure the setting is on:

Sub FormatScanningOn()
Options.FormatScanning = True
End Sub

 

Now when you go to the Customize Ribbon or Quick Access Toolbar dialog in Office you’ll find your macro under the Macros list. You can add the macro as a button on the QAT or a ribbon.

1564 Office Macro command list - Adding to the Customize Command List

In this case the command is stored in the Normal template and available to all documents on that computer.

subs profile e1563205311409 - Adding to the Customize Command List
Latest news & secrets of Microsoft Office

Microsoft Office experts give you tips and help for Word, Excel, PowerPoint and Outlook.

Give it a try. You can unsubscribe at any time.  Office Watch has been running for over 20 years, we've never, ever revealed or sold subscriber details.  Privacy policy
Invalid email address