Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 22 Macros.

Similar presentations


Presentation on theme: "© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 22 Macros."— Presentation transcript:

1 © 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 22 Macros

2 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 2 Objectives Create a macro. Run a macro. Edit a macro. Copy, rename, and delete macros. Customize the Quick Access Toolbar.

3 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 3 Macros Created to perform repetitive tasks quickly. Include command sequences and keystrokes. Save a sequence of tasks as a single command. Include Ribbon commands, formatting options, keystrokes, and dialog box selections.

4 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 4 Create Macros Store macros in a document or in a template. Be default, Word stores macros in the Normal template. Save special-purpose macros in a special- purpose template. Plan the steps you want the macro to perform.

5 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 5 Create Macros Display the Developer tab. Click the Record Macro button. Name the macro, but do not include spaces. –Macro names must begin with an alphabetic character. Determine where the macro will be stored. Key a brief description. Click the Keyboard icon and assign a keyboard shortcut to the macro. –Verify the save location for the macro keyboard shortcut. Click Close. When the recording pointer appears, every action taken with the mouse or the keyboard is recorded. Do not use the macro pointer to select text or move the insertion point. Click the Stop Recording button when finished.

6 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 6 Record Macro Dialog Box

7 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 7 Customize Keyboard Dialog Box

8 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 8 Set Macro Security Macro settings located in the Trust Center. To view or change macro security settings: –Click the Macro Security button on the Developer tab or open the Word Options dialog box. –Click Trust Center. –Click Trust Center Settings. Verify that the selected setting is Disable all macros with notification. Click OK.

9 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 9 Trust Center Dialog Box

10 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 10 Run a Macro Open the template or document. Locate the security warning below the Ribbon. Click the Options button to open the Microsoft Office Security Options dialog box. Click Enable this content. Click OK. Click the Developer tab. Click the Macros button. Verify the setting for the Macros in drop-down list box. Select a macro. Click Run. –Run a macro by pressing the keyboard shortcut.

11 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 11 Microsoft Office Security Options

12 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 12 Edit a Macro Recorded macros create a VBA program. Use the Visual Basic Editor to edit macros.

13 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 13 Edit a Macro Click the Macros button. –The keyboard shortcut to open the Macros dialog box is [Alt]+[F8]. Verify the setting for the Macros in text box. Click the template to edit. Click Edit and the Microsoft Visual Basic Editor window opens. Edit the macro and click the Save button. Click File and click Close and Return to Microsoft Word.

14 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 14 Edit a Macro

15 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 15 Macro after Editing

16 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 16 Copy Macros Macros are stored in a module. Modules are attached to Word documents or templates. All recorded macros are stored in a module named “NewMacros.” To copy macros from one template to another, copy the NewMacros module. –All macros stored in the module are copied to the template.

17 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 17 Copy Macros Open the Macros dialog box. Click the Organizer button. Click the Macro Project Items tab. –The left side of the dialog box lists modules in the current template. –Click Close File on the right side of the dialog box. –Click Open File on the right side of the dialog box, and locate the folder and template file. –Click Open. The NewMacros module appears on the right. Select NewMacros. Click Copy.

18 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 18 Organizer

19 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 19 Copy an Individual Macro Open the Macros dialog box. Select the macro name to be copied. Click Edit to open the Visual Basic Editor. Select the macro text beginning with Sub ( ) and ending with End Sub. Click the Copy button on the Visual Basic toolbar. Scroll to the bottom of the code window. Position the insertion point on a blank line. Click the Paste button.

20 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 20 Copy an Individual Macro

21 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 21 Rename a Macro Rename the copied macro by editing the text after the word “Sub” on the first line of the macro. Edit comment lines. Edit other code lines. Save the changes and return to Word.

22 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 22 Renamed Macro

23 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 23 Delete a Macro Open the Macro dialog box. Select the macro. Click [Delete] and click Yes. Click Close.

24 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 24 Assign a Keyboard Shortcut Open the Word Options dialog box. Click Customize in the left pane. Click the Customize button to the right of Keyboard shortcuts to open the Customize Keyboard dialog box. Locate the Categories list and scroll to the bottom of the list. Click Macros. Verify the setting for the Save changes in drop-down list box. Locate the Macros list and click the macro. Key the keyboard shortcut in the Press new shortcut key text box. Click Assign. Click OK. Click Close.

25 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 25 Customize the Quick Access Toolbar Three ways to add a command to the Quick Access Toolbar. –Click the Customize Quick Access Toolbar button. –Use the Word Options dialog box. –Use the shortcut menu.

26 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 26 Quick Access Toolbar Command List

27 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 27 Word Options Dialog Box

28 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 28 Shortcut Menu

29 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 29 Move the Quick Access Toolbar Default location is beside the Microsoft Office Button. Click the Customize Quick Access Toolbar. Click Show Below the Ribbon.

30 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 30 Assign a Macro to the Quick Access Toolbar Open the Word Options dialog box. Click Customize in the left pane. Click the down arrow for the Choose commands from drop-down list box. Select Macros. Click the down arrow for the Customize Quick Access Toolbar and select an option. –For all documents (default) –For document Select the macro and click Add. Click OK.

31 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 31 Reset the Quick Access Toolbar Open the Word Options dialog box. Click Customize in the left pane. Click the Reset button. Click Yes to restore the Quick Access Toolbar. Click OK.

32 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 32 Lesson 22 Summary A Word macro enables you to quickly perform repetitive tasks involving command sequences and keystrokes. With a macro, you can save a sequence of tasks as a single command When you create macros, you store them in either a document or a template. By default, Word stores macros in the Normal template, but it is best to store special- purpose macros in a special-purpose template Before beginning a macro recording, plan the steps you want the macro to perform, choose a name for it, and decide where it will be stored When you see the recording pointer, every action you take with the mouse or the keyboard is being recorded in your macro

33 THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 33 Lesson 22 Summary You can assign a macro to a button, the Quick Access Toolbar, or to a keyboard shortcut key, which you can then use to run the macro. You can also run a macro from the Macros dialog box When you record a Word macro, a computer program is created that uses Visual Basic for Applications. You can change the macro by carefully editing the Visual Basic code You can use the Macros dialog box to edit, rename, or delete macros You use the Organizer to copy macros from one document or template to another You can customize the Quick Access Toolbar by adding and deleting commands


Download ppt "© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 22 Macros."

Similar presentations


Ads by Google