Microsoft Office 2007 Macros


The purpose of a macro is to automate any repetitious task that would normally require you to follow a long sequence of commands. At its most fundamental level, a macro does nothing more than imitate keystrokes and mouse clicks the user might make. Office perceives menu clicks, ribbon button clicks, and typing as instructions that it is to follow. When you request that Office record a macro, what you’re asking Office to do is watch you perform a series of instructions and then remember that series so that you can repeat them later at your discretion.

Why would you want the same series of instructions repeated? Assume that you found yourself saving a backup of a Word document to a USB-based flash drive that is referred to as drive D: on your computer. For security, you’ll want to save to your flash drive D: every few minutes. The original document appears on C:, and the shortcut Ctrl+S keystroke (and the Quick Access toolbar’s Save command) saves the document to C:; but just for safety, you want to save the file to your drive D: once in a while so that a second copy is available.


The following lists the steps you must perform to save the backup to the D: flash drive:

1. Click your Office button to display the Office menu.

2. Select the Save As command to override Word’s default C: drive location that it would store to if you selected Save.

3. Press your keyboard’s Home key to move the text cursor to the beginning of the filename. The file normally saves the document in the current folder and disk, although you are going to override that location.

4. Type D:\ so that Word saves the file on your D: flash drive.

5. Click Yes to overwrite your previous backup file on D:. (This assumes that you’ve saved the file at least once before in the D: default folder.)

6. Click the OK button to save the document. The default disk drive and folder will now be on D:, so you must restore the default to its original location.

7. Click your Office button to display your Office menu once more.

8. Select Close to close the document from Word’s work area.

9. Click your Office button again to display the Office menu.

10. Select 2. The 2 on the recent documents area of your Office menu will be the second-to-last file you edited, which was the file in its original C: drive location before you saved it to D:. You are now working, once again, with the original file on drive C:, and you’ve placed a copy of it on D:.