Working with Macros. Writing a Macro

Similar documents
MS WORD 2007 (PC) Macros and Track Changes Please note the latest Macintosh version of MS Word does not have Macros.

Automate tasks with Visual Basic macros

Microsoft Word 2011: Create a Table of Contents

Skill Set 4. Macros. By the end of this Skill Set you should be able to: Record a Macro Run a Macro Assign a Macro Create a Multiple Action Macro

Introduction to Word 2007

Creating tables of contents and figures in Word 2013

Excel 2007 Introduction to Macros

Word 2010: Mail Merge to with Attachments

Microsoft Word Level 3

Migrating to Excel 2010 from Excel Excel - Microsoft Office 1 of 1

The Application Getting Started Screen is display when the Recruiting Matrix 2008 Application is Started.

WINDOWS 7 EXPLORE INTERNET EXPLORER 8

Styles, Tables of Contents, and Tables of Authorities in Microsoft Word 2010

Creating trouble-free numbering in Microsoft Word

Outlook . User Guide IS TRAINING CENTER. 833 Chestnut St, Suite 600. Philadelphia, PA

Handout: Word 2010 Tips and Shortcuts

Microsoft Excel Introduction to Microsoft Excel 2007

Working with Macros and VBA in Excel 2007

UF Health SharePoint 2010 Introduction to Content Administration

Getting Started Guide. Chapter 14 Customizing LibreOffice

PowerPoint 2013: Basic Skills

Windows XP Pro: Basics 1

GOOGLE DOCS APPLICATION WORK WITH GOOGLE DOCUMENTS

Lookout Software, LLC. All rights reserved.

Microsoft Access 2007 Advanced Queries

Microsoft Migrating to Word 2010 from Word 2003

Word basics. Before you begin. What you'll learn. Requirements. Estimated time to complete:

Creating Fill-able Forms using Acrobat 8.0: Part 1

Symantec Enterprise Vault

Distribution List Manager User s Manual

Macros in Word & Excel

Excel macros made easy

Sample- for evaluation purposes only! Advanced Outlook. TeachUcomp, Inc. A Presentation of TeachUcomp Incorporated. Copyright TeachUcomp, Inc.

Microsoft Migrating to PowerPoint 2010 from PowerPoint 2003

Excel basics. Before you begin. What you'll learn. Requirements. Estimated time to complete:

Microsoft PowerPoint Exercises 4

Outlook Plugin. What is MangoApps for Outlook?

Microsoft Word Using the Track Changes Feature Last Updated: 2/15/2008

In this example, Mrs. Smith is looking to create graphs that represent the ethnic diversity of the 24 students in her 4 th grade class.

AODA Mouse Pointer Visibility

Internet Explorer 7. Getting Started The Internet Explorer Window. Tabs NEW! Working with the Tab Row. Microsoft QUICK Source

This Skill Builder demonstrates how to define and place sketched symbols in drawings.

How to install and use the File Sharing Outlook Plugin

Microsoft PowerPoint 2010

BACKUP MICROSOFT OUTLOOK/OUTLOOK EXPRESS

KEYBOARD SHORTCUTS. Note: Keyboard shortcuts may be different for the same icon depending upon the SAP screen you are in.

CORSAIR GAMING KEYBOARD SOFTWARE USER MANUAL

PowerPoint 2007 Basics Website:

Courses never cancelled: guaranteed Last minute rescheduling 24 months access to Microsoft trainers 12+ months schedule UK wide delivery

Personalizing your Access Database with a Switchboard

Microsoft Word Quick Reference Guide. Union Institute & University

ACCESS 2007 BASICS. Best Practices in MS Access. Information Technology. MS Access 2007 Users Guide. IT Training & Development (818)

Microsoft Office Access 2007 Basics

Merging Labels, Letters, and Envelopes Word 2013

Acrobat X Pro Accessible Forms and Interactive Documents

Creating a table of contents quickly in Word

MICROSOFT EXCEL 2011 MANAGE WORKBOOKS

Microsoft Office Excel 2007 Key Features. Office of Enterprise Development and Support Applications Support Group

Outlook Quick Steps & Rules

Microsoft Outlook 2007 Calendar Features

Navigating Microsoft Word 2007

Advanced Presentation Features and Animation

Adobe Acrobat X Pro Creating & Working with PDF Documents

Microsoft Office Word 2007 Training

Reduced Quality Sample

Microsoft PowerPoint 2010 Handout

Worldspan Ticketless Payment Go! Script

Module One: Getting Started Opening Outlook Setting Up Outlook for the First Time Understanding the Interface...

Professional Fire Software Control Center. Fire Training Module Training Manual

Click on various options: Publications by Wizard Publications by Design Blank Publication

Last updated: October 4, einvoice. Attorney Manual

Create Database Tables 2

Formatting & Styles Word 2010

Enhancing the SAS Enhanced Editor with Toolbar Customizations Lynn Mullins, PPD, Cincinnati, Ohio

Learn how to create web enabled (browser) forms in InfoPath 2013 and publish them in SharePoint InfoPath 2013 Web Enabled (Browser) forms

BIGPOND ONLINE STORAGE USER GUIDE Issue August 2005

MAKE A NEW SUBSITE 1. On the left navigation, click Site Contents (or Sites). Scroll down to subsites. Click new subsite.

Microsoft Access 2010 handout

Produced by Flinders University Centre for Educational ICT. PivotTables Excel 2010

Microsoft Outlook Introduction

Basic Microsoft Excel 2007

Microsoft Office 2013

Employee Manual Development Tool Version 7.0. User Guide

Microsoft PowerPoint 2011

Microsoft Word 2010 Training

Bank Reconciliation: Improvements for the Shelby v5 Spring 2006 Release

Microsoft Outlook 2003 Quick How-to Guide

Instructions for creating a data entry form in Microsoft Excel

Audacity is a free, totally free, audio editing program. Get it here:

What is OneDrive for Business at University of Greenwich? Accessing OneDrive from Office 365

TheFinancialEdge. Journal Entry Guide

Microsoft Migrating to Access 2010 from Access 2003

Sendspace Wizard Desktop Tool Step-By-Step Guide

Outlook Express. a ZOOMERS guide

Microsoft Excel 2013: Macro to apply Custom Margins, Titles, Gridlines, Autofit Width & Add Macro to Quick Access Toolbar & How to Delete a Macro.

MS Word 2007 practical notes

Sample Table. Columns. Column 1 Column 2 Column 3 Row 1 Cell 1 Cell 2 Cell 3 Row 2 Cell 4 Cell 5 Cell 6 Row 3 Cell 7 Cell 8 Cell 9.

Content Author's Reference and Cookbook

Introduction to Microsoft Access 2003

Word 2010: The Basics Table of Contents THE WORD 2010 WINDOW... 2 SET UP A DOCUMENT... 3 INTRODUCING BACKSTAGE... 3 CREATE A NEW DOCUMENT...

Transcription:

Working with Macros 1 Working with Macros THE BOTTOM LINE A macro is a sequence of keystrokes or mouse commands saved together that can be performed by issuing a single command. When working in Word, you may find yourself repeatedly keying certain text, perhaps your name and title, within many of the documents you create. You can save time and keystrokes by creating a macro that will automatically add this text to a document each time it runs. A macro can be created to perform any number of commands in Word, including formatting text, inserting an object, and opening a dialog box. Writing a Macro The Record Macro command enables you to create a macro by recording a specific sequence of actions. To access the macro commands, the Developer tab must be displayed on the ribbon. WRITE A MACRO GET READY. Before you begin these steps, be sure to launch Microsoft Word and open a new document. 1. Click the Microsoft Office Button, and then click Word Options. 2. Click the Popular option, if necessary. 3. In the Top options for working with Word section, select the Show Developer tab in the Ribbon checkbox, as shown in Figure 1. Figure 1 Show Developer tab in the Ribbon checkbox

Working with Macros 2 4. Click OK to display the Developer tab in the ribbon. Click the Developer tab. The macro commands are found in the Code group, as shown in Figure 2. Figure 2 Developer tab in the Ribbon Code group Record Macro button 5. On the Developer tab, in the Code group, click Record Macro. The Record Macro dialog box appears, as shown in Figure 3. Figure 3 Record Macro dialog box 6. In the Macro name box, key Name_Title. TROUBLESHOOTING When naming your new macro, ensure that you choose a unique name. If you enter a name that currently belongs to an existing macro, your newly recorded commands will replace any actions recorded in the original macro. 7. In the Store macro in box, select All Documents (Normal.dotm), if necessary. 8. In the Description box, key First and last name with title. 9. Click the Keyboard icon to display the Customize Keyboard dialog box, as shown in Figure 4.

Working with Macros 3 Figure 4 Customize Keyboard dialog box 10. Click to place your cursor in the Press new shortcut key box if necessary. On your keyboard, press Ctrl + 1. The dialog box should look similar to Figure 4. 11. Click Assign, and then click Close. 12. Key your name, press Enter, and then key President. 13. On the Developer tab, in the Code group, click Stop Recording, as shown in Figure 5. Figure 5 Stop Recording button Click to stop recording macro 14. SAVE your document as Name_Title_Macro. PAUSE. LEAVE the document open to use in the next exercise. As you have just seen, the Record Macro command enables you to create a custom macro by recording a sequence of actions. The macro commands are found on the Developer tab of the ribbon. To write a new macro, click Record Macro in the Code group to display the Record Macro dialog box. After you ve entered a name for the macro, and a brief description, you can assign the macro to a combination of keys on the keyboard or to a newly created button on the Quick Access toolbar, as shown in Figure 3. This enables you to run the macro easily at any time using the designated keys or the button. After the macro has been named and/or assigned a shortcut, perform the set of actions to be included in the macro and click Stop Recording in the Code group. If you have not finished recording the entire sequence of actions, but need to perform other actions that should not be included in the macro, you can click Pause Recording in the Code group, as shown in Figure 6.

Working with Macros 4 Figure 6 Pause Recording button Click to pause recording macro When the macro recording is paused, the Resume Recorder button appears in the Code group, as shown in Figure 7. When you are ready to resume the macro recording, simply click Resume Recorder and complete the sequence of actions. Figure 7 Resume Recorder button Click to resume recording of macro Using a Macro You can run a macro within any Word document. You can use a macro to save keystrokes, which can speed up your writing, editing, or formatting process. USE A MACRO USE the document from the previous exercise. 1. Press Ctrl + A to select all of the text in the document, and then press the Delete key to remove the text. 2. Press Ctrl + 1. Your screen should appear similar to Figure 8. Figure 8 Running a macro

Working with Macros 5 3. Press Ctrl + A to select all of the text in the document, and then press the Delete key to remove the text. 4. On the Developer tab in the Ribbon, click Macros. The Macros dialog box will be displayed. 5. In the Macro name list, select Name_Title, and then click Run, as shown in Figure 9. The text is reinserted in the document. Figure 9 Macro dialog box Click to select macro Click to run selected macro PAUSE. LEAVE the document open to use in the next exercise. The Run command enables you to run an existing macro within a Word document. If a macro has been assigned to a shortcut, you can quickly run the macro by either clicking the appropriate button on the Quick Access toolbar or by pressing the designated series of keys on the keyboard. You can also run a macro from the Macros dialog box by clicking Macros in the Code group. Select All active templates and documents in the Macros in section to display a list of custom macros created in Word. Word also provides several built-in macros for commonly used commands. In the Macros dialog box, select Word Commands in the Macros in list to view a complete list of built-in macros. Editing a Macro The Edit command is found on the Macro dialog box. This command enables you to make changes to an existing macro. EDIT A MACRO USE the document from the previous exercise. 1. In the Code group on the Developer tab, click Macros. 2. In the Macros dialog box, select the Name_Title macro, and then click Edit. The macro appears in the Microsoft Visual Basic editor window, as shown in Figure 10.

Working with Macros 6 Figure 10 Macro displayed in Microsoft Visual Basic editor 3. Select the word President on the next-to-the-last line, and then key Chief Executive Officer. Your screen should appear similar to the screen shown in Figure 11. Figure 11 Edited macro 4. Press Ctrl + S to save the changes to the macro. 5. Click File on the menu bar, and then select Close and Return to Microsoft Word. 6. Press Ctrl + A to select all of the text in the document, and then press the Delete key to remove the text. 7. Press Ctrl + 1. Your screen should appear similar to Figure 12.

Working with Macros 7 Figure 12 Newly edited macro PAUSE. LEAVE the document open to use in the next exercise. As you have just seen, you can make changes to an existing macro using the Microsoft Visual Basic editor. In the Code group on the Developer tab, click Macros to open the Macros dialog box. Select the macro you want to edit, and then click Edit. You can edit, remove, or add additional text or actions to the macro. After you have completed all changes, be sure to save the macro before exiting the Microsoft Visual Basic editor. TAKE NOTE Making more extensive edits to an existing macro requires a working knowledge of Microsoft Visual Basic. If you have many changes to make to a macro, it may be easier simply to record a new macro. Deleting a Macro The Delete command is also found on the Macros dialog box. This command enables you to remove an existing macro from Word permanently. DELETE A MACRO 1. In the Code group on the Developer tab, click Macros. 2. In the Macros dialog box, select the Name_Title macro, and then click Delete. 3. A Word dialog box appears, as shown in Figure 13. Figure 13 Word dialog box

Working with Macros 8 4. Click Yes to delete the macro and return to the Macros dialog box. Click Close to close the Macros dialog box. 5. SAVE your changes to the document, and then CLOSE the file. STOP. CLOSE Word. The Delete command allows you to completely remove an existing macro in Word. In the Code group on the Developer tab, click Macros to open the Macros dialog box. Select the macro to be removed, and then click Delete. Microsoft Word prompts you to confirm the deletion. Click Yes to permanently remove the macro.