Using Word, here's how to record a macro that sorts any document that's III the foml of a list. Start by typing a short list of Items into a new document, then save It for later use. As always when recording macros, it's a good idea to first work out the required sequence of actions and write them down. It's also better to use keyboard shortcuts whenever possible, saving mouse clicks and movements only for those actions that absolutely require them. This limits the chances of mouse actions being misinterpreted when replayed.

The keystrokes for sorting a list and placing the cursor at the beginning of the document are: Ctrl and Home, Shift and Ctrl and End, Ait and A, S, Enter, Ctrl and Home. Try these out before recording the macro to see what each action does. To create the macro, open the Tools menu and select Macro, Record New Macro. Give the macro a name with no spaces in it and optionally assign it to either a toolbar or a keyboard shortcut.

Name:  Recording a macro using word.jpg
Views: 140
Size:  38.1 KB

Word macros can either be stored for use only within the current document or placed in the global template (Normal.dot). In this case, use Nonnal.dot to make the macro universally available. Click OK, then perform the list of commands. In the tiny toolbar that is displayed while this is going on, click the Stop Recording icon (it's the one on the left) when finished.

The list has now been sorted and the macro has been created and saved. Close the document without saving the changes to the list, then reopen it. The list can now be resorted by invoking the macro you just created from its toolbar or by using its keyboard shortcut. If neither of these was assigned, press the shortcut key combination of Alt and F8 to display the Macros dialogue box, then highlight the new macro and click Run.