Add a Macro to the Quick Access Toolbar (QAT)

Home Up Odds & Ends Photo Gallery Search Contact Me Privacy Notice What's New?

 

 

The information in this website is provided without risk or obligation and free of charge.  However, if you have benefitted from my efforts here and would like to make a contribution to help me continue and maintain this work then any donation will be greatly appreciated. Please click the adjacent button to access PayPal.  Thank you.
 
The purpose of this Microsoft Word Tips & Microsoft Word Help page is to show you how to create a basic macro and add a control to the Quick Access Toolbar (QAT) that will execute the macro code.

For this project I will use a basic macro that can be used to restore the Insert>Picture>From Scanner or Camera user interface (UI) capability that was available in earlier Word versions (see illustration below).  For whatever reason this feature was excluded from the Word2007 UI and its list of available commands.  

Fortunately the feature can be restored using an old WordBasic command in a simple macro.

:old: If you are already familiar with creating macros or already have your own macro available, then you can skip to step 4.

1. First you will need access to the UI "Developer" tab.  This tab contains the UI commands for creating a macro .  It is initially hidden by default.  To display the Developer tab, click on the round Office Button (menu) then click Word Options. 

- Using the Word Options "Popular" category check the box "Show Developer tab in the Ribbon" and then press the "OK" button.

- The Developer tab is now displayed on the Word UI Ribbon.

2.  Next you create the macro by clicking on the "Macros" command in the "Code" group of the Developer tab.  This opens the "Macros" dialog.  Use this dialog to type in a suitable macro name and then click "Create."  

- In the Visual Basic Editor window that appears, type in the code shown below before the "End Sub" statement.  Then close the the editor by clicking the red "X" in the top right hand corner.

3. To verify the macro works, click the Macros command again, select the macro just created, then click "Run."

- This executes the macro code and displays the necessary dialog to insert images from a scanner or camera.

4. Add a control to execute this macro from the QAT as follows:

- Click the dropdown arrow at the right end of the QAT and select "More Commands..."

- In the Word Options dialog that appears, select "Macros" from the "Choose commands from" dropdown.  Select the macro from the list of available macros (only one shown here for clarity) and the press the "Add >>" button.  The macro will appear in the list of QAT commands on the right as shown.

:old: You can display this same dialog with a right click anywhere on the QAT and select "Customize Quick Access Toolbar..."

- Use the "Modify" command to customize the QAT command icon and screen tip display.

- The macro can now be executed by clicking on the control now displayed on the QAT.

This concludes this tips page.

Looking for something else?

Google