Logo
HOW TO
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
 
 
Windows 7

Microsoft Word 2010 : Expanding Word Functionality - Running a Macro & Controlling a Macro

8/17/2011 6:02:58 PM

Running a Macro

Running a macro is similar to choosing a command in Word. When you record or edit the macro, you have the choice of making it available through a menu command, a keyboard combination, or even a toolbar button. As with other options in Word, your choice depends on your personal preferences—and you can choose to make more than one option available. Where you store a macro when you save it determines its availability later. Macros stored in the Personal Macro document are always available, and macros stored in any other documents are only available when the document is open.

Run a Macro

Click the Developer or View tab.

Click the Macros button.

  • If you use the View tab, click View Macros on the menu.

Timesaver

Click the Macros button on the Status bar.

Click the macro you want to run.
Click Run.

Delete a Macro

Click the Developer or View tab.

Click the Macros button.

  • If you use the View tab, click View Macros on the menu.

Click the macro you want to delete.

Click Delete, and then click Delete again to confirm the deletion.


You can stop a macro. Press Ctrl+Break to stop a macro before it completes its actions.

Controlling a Macro

If a macro doesn’t work exactly the way you want it to, you can fix the problem using Microsoft Visual Basic for Applications (VBA). VBA allows you to debug, or repair, an existing macro so that you change only the actions that aren’t working correctly. All macros for a particular document are stored in a macro module, a collection of Visual Basic programming codes that you can copy to other document files. You can view and edit your Visual Basic modules using the Visual Basic editor. By learning Visual Basic you can greatly increase the scope and power of your programs.

Debug a Macro Using Step Mode

Click the Developer or View tab.

Click the Macros button.

  • If you use the View tab, click View Macros on the menu.

Click the macro you want to debug.

Click Step Into.

The Microsoft Visual Basic window opens.

Click the Debug menu, and then click Step Into (or press F8) to proceed through each action.

  • You can also use other commands like Step Over and Step Out to debug the code.

When you’re done, click the Save button, click the File menu, and then click Close and Return to Microsoft Word.

Click OK to stop the debugger.

You can display the Debug toolbar. In the Visual Basic editor, click the View menu, point to Toolbars, and then click Debug.

Edit a Macro

Click the Developer or View tab.

Click the Macros button.

  • If you use the View tab, click View Macros on the menu.

To open a macro, click the macro you want to change, and then click the View Code button.
Click the Module window containing the Visual Basic code for your macro.

Type new Visual Basic commands, or edit the commands already present.

Click the Save button, and then click the program Close button.

Copy a Macro Module to Another Document

Open the document files you want to copy the macro from and to.

Click the Developer tab.

Click the Visual Basic button.

Click the View menu, and then click Project Explorer.

Drag the module you want to copy from the source document to the destination document.

Click the Save button, and then click the program Close button.
Other -----------------
- Visual Basic 2010 : Discussing the New Drag and Drop Data-Binding (part 4) - Implementing String Formatters and Value Converters
- Visual Basic 2010 : Discussing the New Drag and Drop Data-Binding (part 3) - Understanding Views and Binding Lists
- Visual Basic 2010 : Discussing the New Drag and Drop Data-Binding (part 2) - Creating Master-Details Forms
- Visual Basic 2010 : Discussing the New Drag and Drop Data-Binding (part 1) - Creating Tabular Data Forms
- Visual Basic 2010 : Introducing the Data-Binding
- Microsoft PowerPoint 2010 : Adding a Digital Signature
- Microsoft PowerPoint 2010 : Adding Security Encryption to a Presentation & Marking a Presentation as Read-Only
- Microsoft Visio 2010 : Creating a New Report
- Microsoft Visio 2010 : Running a Predefined Report
- Microsoft Excel 2010 : Building More Powerful Worksheets - Using Information Functions & Using Compatibility Functions
 
 
REVIEW
- First look: Apple Watch

- 10 Amazing Tools You Should Be Using with Dropbox
 
VIDEO TUTORIAL
- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
 
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS
Popular keywords
HOW TO Swimlane in Visio Visio sort key Pen and Touch Creating groups in Windows Server Raid in Windows Server Exchange 2010 maintenance Exchange server mail enabled groups Debugging Tools Collaborating
Top 10
- Microsoft Excel : How to Use the VLookUp Function
- Fix and Tweak Graphics and Video (part 3) : How to Fix : My Screen Is Sluggish - Adjust Hardware Acceleration
- Fix and Tweak Graphics and Video (part 2) : How to Fix : Text on My Screen Is Too Small
- Fix and Tweak Graphics and Video (part 1) : How to Fix : Adjust the Resolution
- Windows Phone 8 Apps : Camera (part 4) - Adjusting Video Settings, Using the Video Light
- Windows Phone 8 Apps : Camera (part 3) - Using the Front Camera, Activating Video Mode
- Windows Phone 8 Apps : Camera (part 2) - Controlling the Camera’s Flash, Changing the Camera’s Behavior with Lenses
- Windows Phone 8 Apps : Camera (part 1) - Adjusting Photo Settings
- MDT's Client Wizard : Package Properties
- MDT's Client Wizard : Driver Properties
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro