Use of Macros as an Accessibility Strategy
Macros are coded sets of instructions added to existing programs to change or enhance their functionality. In some cases, macros are easy to create and implement; in others, they may require sophisticated programming knowledge. This article talks about how macros can be used as an important accessibility tool and various ways to develop them.
Examples of Macro Use
Macros can be used to simplify the execution of complex functions, particularly those that need to be repeated. For example, users may need to go through documents imported from other sources to find and remove extraneous page breaks; a macro can be written to initiate and perform this process with a single key combination.
Macros can be developed that add functionality that is not in the original programs, For example, a macro might be used to copy all hyperlinks within one document to a separate document.
Macros can be used to make assistive technology work more seamlessly with mainstream programs, or make them more compatible with proprietary programs. For example, the JAWS screen reader has its own macro capabilities that could be used to activate a button that a JAWS user could not access otherwise.
Macros can be used to reduce or eliminate the need to use a mouse. For example, many programs have built-in capabilities that allow use of keyboard commands as mouse alternatives (e.g., pressing the ALT key to pull down the leftmost menu on a menu bar). If this capabilities does not exist within a given program, it can be added using macros.
Depending on the user’s needs and the capabilities of the macro program, macros can be set up to activate in one or more ways:
- Via pressing a “hotkey,” which is one or a combination of keys assigned to activate the macro. Care needs to be taken that hotkey assignment does not conflict with key assignments which are already part of the program(s) that the macro needs to work with; e.g., in many programs, Control+C copies highlighted text, so this would be a bad combination to assign to a user-created macro.
- Via a mouse action such as single- or double-clicking. This may be particularly helpful for individuals whose find the mouse easier to use than a keyboard.
- Via typing a “word”—e.g., typing EXC might trigger a macro to start Excel.
Creating Macros in Microsoft Word
Most Microsoft Office programs have built-in macro capabilities, using one of the easiest ways to create macros: assign the keystroke combination you want to use to activate the macro, then simply “record” the action as you perform it once. Afterwards, when you press the key combination, the action will be performed automatically within the Office application. Note that although this capability is powerful, it will not capture all actions—e.g., it will not record selecting text using a mouse.
To record a macro using Microsoft Word (the instructions will be similar for other supported Office programs):
In versions of Word prior to 2007, select the macro function under the Tools menu.
In Word 2007, the macro function is on the Developer toolbar:
- Click on the Office button (upper left corner).
- In the resulting dialog box, click on “Word Options”
- In the Word Options dialog box, click on “Popular”
- Under “Top Options for Working with Word,” make sure the “Show Developer Tab in the Ribbon” checkbox is checked. Click OK.
In the Developer ribbon, click on “Record Macro”
In Word 2010, the process for bringing up the Developer toolbar is different:
- Click the Filetab.
- Click Options.
- In the categories pane, click Customize Ribbon.
- In the list of main tabs, select Developer. Click OK.
Third-Party Macro Software
A variety of third-party programs, such as Auto HotKey, Macro Express, and Automation Anywhere, are available; most are free or inexpensive. These programs can be used in conjunction with a wide variety of mainstream and proprietary applications to facilitate accessibility.
Assistive Technology-Specific Macros
Popular assistive technology programs including JAWS and MAGic (Freedom Scientific), Window-Eyes (GW Micro), NaturallySpeaking (Nuance) and ZoomText (AI Squared) have their own macro scripting languages. Their primary purpose is to make the assistive technology work or work better with other application software. The scripting languages are usually included with the program at no charge, but may have a significant learning curve. The manufacturers usually provide tutorials and/or classes on writing scripts in their languages, and may provide lists of programmers who they have certified.
Alan Cantor is a noted expert on macro development for meeting accommodation needs, and has written a variety of articles and FAQs on this topic. Many thanks to Alan for his suggestions on this article.