Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
programming4us
Windows 7

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

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
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
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server