Home / Publications / Macros & Customization / Radical Software Surgery: Case Studies in Advanced Customization

Radical Software Surgery:
Case Studies in Advanced Customization

Copyright © Alan Cantor 2005. All rights reserved.

Introduction

Commercial applications are rarely as accessible or usable as they could be. People with disabilities regularly encounter software tasks that they cannot perform, or can perform only with great difficulty. In this paper I describe four Windows customization techniques that significantly improve software accessibility and usability:

  1. Modify the user interface of applications
  2. Record and playback commands in Microsoft Office applications
  3. Develop commands in Visual Basic for Applications (VBA)
  4. Script macros

I draw on case studies to illustrate how these techniques increase efficiency, lessen physical and mental effort, reduce error, and lead to greater satisfaction. Customization produces accessibility and usability enhancements that cannot be achieved in any other way.


Prerequisite skills

Three intermediate and advanced skill-sets are helpful for people who want to do customization:

1. Knowledge of existing application commands

Some programs have obscure features that are indispensable for customization. These features tend to be buried deeply in menus and poorly-documented.

2. Understanding of keyboard-only techniques

Custom commands that involve mouse actions may be unreliable. When recording VBA commands, it is not even possible to select text or move around a document using the mouse.

3. Programming experience

A background in computer programming is extremely useful when learning VBA and helpful when scripting macros.

The VBA editor and the Macro Express UI are challenging for screen reader users. Happily, some of these access problems can be repaired or lessened using macro software.


Four customization techniques

1. Modify the user interface of applications

Some applications feature modifiable user interfaces. Microsoft Office products are especially malleable. It is possible to create and delete menus and toolbars; add, remove, and reorder commands on menus and toolbars; rename commands; change hotkeys and accelerator keys; substitute text for icons; and more.

Example: Assign a shortcut key to any Word command

Note: The technique is similar in other Office applications.

  1. Choose "Tools > Customize."
  2. Activate the "Keyboard..." pushbutton.
  3. Select one of the "Categories" from the left list box.
  4. Select a corresponding command, macro, etc. from the right list box.
  5. Go to the "Press new shortcut key" edit box.
  6. Press the desired shortcut key.
  7. Close the "Customize Keyboard" dialog box.
  8. Close the "Customize" dialog box.
  9. Test the shortcut key.

Example: Add a command to the UI in an Office application

Note: This technique is not screen reader accessible.

  1. Choose "Tools > Customize."
  2. Go to the "Commands" page tab.
  3. Select one of the "Categories" from the left list box.
  4. Select a corresponding "Command" from the right list box.
  5. Drag the command icon to the destination menu or toolbar, and drop it.
  6. Right-click the command to change its name, appearance, accelerator, and so on.
  7. Close the "Customize" dialog box.

2. Record and playback commands in Microsoft Office applications

If you know the precise sequence of steps to perform a task, you may be able to capture it as a command using the "Macro Recorder." The new command can be triggered by a hotkey or placed on a menu or toolbar.

While recording, the keyboard must be used to navigate and select. The mouse can only to used to click on menus and toolbars, manipulate controls, and resize and move windows.

Example: Record a new Word command

Note: Similar techniques work in other Office applications.

  1. Choose "Tools > Macro > Record New Macro..."
  2. Type a name in the "Macro Name" edit box.
  3. Follow the instructions to bind the macro to a keyboard shortcut or place it on a toolbar.
  4. Using the keyboard and mouse, perform the steps to perform an action.
  5. Choose "Tools > Macro > Stop Recording," or click on the "Stop Recording" icon.
  6. Test the command.

To change how command activation, follow the steps in the previous section. (Choose "Macros" from the "Categories" list.)

3. Develop commands in Visual Basic for Applications

Visual Basic for Applications (VBA) is a programming environment built into Microsoft Office. Use VBA to modify recorded commands and create commands from scratch.

A good way to learn VBA is to record a command and test it under different conditions. Recorded commands often fail because the recorder captures superfluous instructions. Many commands can be fixed by deleting a few lines of code. Press Alt+F11 to launch the VBA editor, find the command, modify the code, and re-test the command.

VBA commands can be extremely versatile and robust. VBA supports user prompts, decision-making, branching, feedback via dialog boxes and status lines, and error handling. VBA Help and on-line resources contain excellent code samples.

4. Script macros

Use macro software to automate repetitive tasks, create workarounds to accessibility and usability problems, and make shortcuts. Macro Express and Active Words are both excellent.


Case studies

Script-writing tool for a playwright with learning disabilities

A university student, majoring in Drama, has learning disabilities that make it hard to manipulate a mouse and understand menu commands and toolbar icons. For a scriptwriting course, she must submit scripts in this format:

Character name: UPPERCASE, BOLD, CENTRED

Stage instructions: italicized, centred

Dialog: left-justified with indented left and right margins

Solution: A script-writing template containing three, linked paragraph styles. Pressing Enter starts a new paragraph and activates the next style. After typing the dialog, pressing Enter activates the style associated with the character name. Thus the script automatically formats as she types.

Custom "Find" commands in Word for a blind lawyer

Navigating through long documents using "Find" is inefficient because setting the search direction is awkward; the document cannot be read while the "Find and Replace" dialog is displayed; and the hotkey for "RepeatFind," Shift+F4, forces the user to lift his hands from the home row.

Solution: Reassign "RepeatFind" to a key combination that he can more easily reach. Create separate "Find Forward" and "Find Backward" commands using VBA. These commands return focus to the document after initiating a search. The new commands also search for occurrences of selected text without invoking a dialog box. For example, to find the next three occurrences of a phrase, select the phrase and activate "Find Forward" three times.

Word menu containing only a list of recently opened documents

The same lawyer wants a menu that contains only recently opened documents.

Solution: Create a new menu and place it on the menu bar to the left of the File menu. Rename the original "File" menu "&Documents" and the new menu "&File." Move every command from the "Document" menu to the "File" menu, leaving only "List of Recently Used Files."

Font size toggle for a journalist with low-vision

A journalist receives background notes from her editor electronically with font sizes of 10 or 12 points. She increases the font size to 36 points, prints the documents, and revises them on screen. She changes the font size to 12 points before submitting them to her editor.

Solution: A VBA command that toggles a document between 12 and 36 points, and two VBA commands that increase/decrease the zoom level in 5% intervals.

Colour-coded text for a student with mouse-induced repetitive strain injuries

A Ph.D. candidate uses the "Highlight" tool to colour-code text in four different colours. Using the mouse to select text, pick colours, and remove highlighting exacerbates the injury.

Solution: A VBA command to cycle through five highlight colours. Each time the command is activated, the highlight colour changes for the selected text. (If text is not selected, the command acts on the current sentence.) The fifth colour in the sequence turns off highlighting.

Task-switching macros for a call centre employee with upper-body mobility impairments

A call centre employee who uses MouseKeys loses time switching between eight programs.

Solution: Pressing F1 through F8 brings up the appropriate application. Scripted in Macro Express.

PowerPoint "View Slide Show" for a keyboard-only user

The only way to start a show from the current slide is to click on a status-bar icon. It is not keyboard accessible.

Solution: A Macro Express command to click on the status-bar icon. It is activated by F5, and is recognized only when PowerPoint is running and has focus.

“Escaping” from Help for a toe-typist

A toe-typist wants to easy way to close Help screens. To close older versions, press Esc; to close newer versions, press Alt+F4.

Solution: A Macro Express command, activated by Esc, that sends Alt+F4 to the window. The command is recognized only when the word "Help" appears in the title bar.


Conclusion

Commercial software often forces users to perform simple tasks in difficult ways. People with and without disabilities have become acclimatized to applications that are not especially usable. Although customization is presented here as a barrier-removal strategy that benefits people with disabilities, the real significance of customization is that it produces working models of truly accessible and usable features. Let us hope that developers of mainstream software take note.