Resting Anchor

The Anchorage

Personal website of Gregory K. Maxey, Commander USN (Retired)

Add Macro to Quick Access Toolbar (QAT)
(A Microsoft Word Help & Tip page by Gregory K. Maxey)


The information, illustrations and code contained in my "Microsoft Word Tips" are provided free and without risk or obligation.

Click to acces PayPal Verification Service Click to acces PayPal Verification Service

However, the work is mine. If you use it for commercial purposes or benefit from my efforts through income earned or time saved then a donation, however small, will help to ensure the continued availability of this resource.

If you would like to donate, please use the appropriate donate button to access PayPal. Thank you!

Create a Macro

For whatever reason, the Word 2003 Insert>Picture>From Scanner or Camera command (see illustration below) was excluded from the Word 2007/2010 UI and the list of available commands.

Insert From Scanner command

Nil despero! The feature can be restored using an old WordBasic command as follows:

Site Note icon Note: If you are already familiar with creating macros or already have your own macro available, then you can skip these next four steps.

  1. If not displayed, display the "Developer" tab. This tab contains the ribbon UI commands necessary to create a macro.

Site Note icon Note: The tab is initially hidden by default in Word 2007. To display, click on the round Office Button (menu). Then click "Word Options" and proceed as illustrated below.

Displaying Delveloper tab.
  1. Create a new macro by clicking on the "Macros" command in the "Code" group of the Developer tab. This opens the "Macros" dialog. Type in a suitable macro name and  click "Create."
Macros Dialog command

Enter macro name
  1. In the Visual Basic Editor window that appears, copy and paste the code shown below before the "End Sub" statement or enter your own code. Then close the editor by clicking the red "X" in the top right hand corner.
VBA Code:
On Error Resume Next
VBA Editor with code
  1. Verify your macro is functioning. Click the Macros command again, select the macro just created or your own macro, then click "Run."
Run macro

This executes the code and displays the dialog to insert images from Scanner or Camera

Scanner panel


Add Control to QAT

Perform the following steps to add a control to the QAT which will execute the macro you created above:

  1. Click the small dropdown arrow at the right end of the QAT and select "More Commands..."
QAT More Commands ...
  1. 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 press the "Add >>" button. The macro will appear in the list of QAT commands on the right as shown.
Adding macro

Site Note iconNote: You can also display the dialog shown above by right clicking anywhere on the QAT and selecting "Customize Quick Access Toolbar..." or using the Office Menu>Word Options>Customize.  In Word 2010 there is a dedicated customization dialog for "Quick Access Toolbar" and "Customize Ribbon."  This tips page was developed using Word 2007 and actual displays in Word 2010 will vary.

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

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

Command shown added to QAT

That's it! I hope you have found this tips page useful and informative.



Click to acces PayPal Verification Service Click to acces PayPal Verification Service

Do you want to make a payment for consulting work or donate to help support this site?

PayPal is a safe, easy way to pay online.

Use the appropriate currency "Donate" button to make a payment or donation.

Search my site or the web using Google Search Engine

Google Search Logo