macros
RH

Forum home » Delegate support and help forum » Microsoft Word Training and help » Macros

Macros

resolvedResolved · Low Priority · Version 2003

Jane has attended:
Word Advanced course

Macros

when might i use macros on a daily basis at work in the office

RE: macros

Hi Jane,

Thank you for your post and welcome to the forum, in response to your question;

Most Microsoft Word users are comfortable with performing such tasks as formatting a document (defining margins, orientation, font, etc), selecting a printer and printing all or a portion of a document. For a single document, this is relatively easy to accomplish using the toolbars and menus, but if multiple documents are involved then this manual process becomes very time consuming. This is where a macro comes into its own;

A Word Macro stores together a group of instructions and allows the user to execute the Macro instead of having to execute each instruction separately. Note: Word Macros contain Visual Basic Code.

Creating a Word Macro
The easiest way to generate a Word Macro is to record the keystrokes that are necessary to perform the desired task and translate them into VBA statements that are stored in a Subroutine. Although this is an easy way to create a Macro, it requires some planning ahead of time to eliminate the possibility of adding unwanted keystrokes into the Macro. On the other hand, once a Macro is generated, the VBA editor can be used to edit or correct the VBA statements.

Recording a Macro:
From the Main Toolbar: select Tools, Macro and Record New Macro to bring up the Record Macro Screen.
In the Record Macro Screen:
Define the Macro Name by using the Word generated Macro Name or entering a new Macro Name (It can be changed later). If the name you enter is the same as an existing Word Macro, you will be prompted whether or not to replace the existing Macro.You can assign the Macro to a Toolbar or Shortcut Keys or wait until after the Macro has been defined.

Define where the Macro is to be stored:
Storing the Macro in normal.dot makes it available to all documents generated using the default template.
Use the Word generated Description or enter a new Description (It can be changed later).
Click the OK Button to begin recording any subsequent keystrokes.
A small toolbar will appear during the recording session to indicate that keystrokes are being recorded.
Click on the leftmost icon (blue square) to stop recording.
Click on the right most icon to pause

Running a Word Macro:
Using the Menu
From the Main Menu, select Tools, Macro and then Macros to bring up the Macros Screen.
Select a Macro Name from the list of Macros
Only stand-alone Macros that do not require run-time parameters will be displayed
Click the Run Button to execute the Macro.

Placing a Macro on the Toolbar:
Adding a Macro to the Toolbar makes the Macro more easily accessible.
From the Menu bar, select Tools and Customize to open the Customize Screen.
In the Customize Screen:
Click on the Commands Tab, Scroll through the Categories and Click on Macro to display all the Macros in the Commands column.
Select a Macro from the Commands Column and Drag and Drop it to the Toolbar.
The Macro will be added to the Toolbar and identified by the Macro Name.
To change the identifier, click on the Modify Selection Button and modify the Name.
Click the Close Button to return to Microsoft Word.
On the Standard Toolbar, the Macro will be displayed.

I hope that has been useful to you, regards Pete

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Word tip:

Creating perfectly symmetrical shapes

Are you a perfectionist when it comes to drawing shapes in Word?

If you hold down the Shift key whilst drawing a shape from the Drawing toolbar, you can create perfectly symmetrical circles and squares; and perfectly straight lines.

View all Word hints and tips


Server loaded in 0.05 secs.