Main menu (IT)

Word Macros: Three Examples to Automate Your Documents

October 8, 2015

Word logo.

Photo Courtesy of PCWorld

"Word macros are one-click wonders that let you program complex procedures to launch at your bidding. Here are a few examples to get you started. One creates your letterhead; the second one inserts pre-formatted tables; and the third one defines and designs custom book formats. 

NOTE: You’ll see some instructions with strings of keystrokes that are macro instructions for repositioning your cursor. Be sure to copy them exactly as written. 

Set up, define, and record macros

Step 1: Set up the macro

A. Select the View tab, then Macros > Record Macro.

B. In the Record Macro dialog box, enter a macro name and description. Follow these rules for the name: 

  • Macro names must begin with a letter and use either letters or numerals. You cannot use spaces, non-alphanumeric characters, or periods.
  • Macro names can be 80 characters maximum
  • Macro names cannot conflict with the program’s reserved commands or keywords such as Print, Save, Copy, Paste.
  • Descriptions are just notes that summarize the macro’s function.

C. For the Store Macro In field, choose All Documents to run this macro in all of your Word documents, or select the current document (displayed by filename) to use this macro in the current document only. Select OK.

D. Next, in the Assign Macro To panel, select Button or Keyboard (shortcut) for the method used to access and run the macro."

Read more at PCWorld