Office 2007 - Word

Lesson 56 : Macros

56/57 Lessons 

Macro

 
A macro is a series of automated actions, which can perform one or more tasks by simply pushing a button.
A macro takes the actions you perform on your keyboard and stores it as a Visual Basic Module.
When we later want to repeat all these steps, we have only one button.
For example, suppose you have the name, address, and fax and phone number on every page of your document.
It would not be very useful to type this for each page, so we type this information once, but take it as a macro.

To create a macro, we choose the tab “View” in the ribbon, and click the button “Macro”.
Choose “Record Macro” from the drop-down menu.

This opens the dialog box “Record Macro”.

In the upper section, we give our macro a descriptive name such as “Address”.
The name of a macro can not contain spaces, otherwise it will not work.

In the next part of the dialog we must decide how we want to run the macro later.
If we want to assign a macro to a button in the toolbar “Quick Access”, then click “Button”, where you want perform a macro and a key on your keyboard then click “Keyboard”.
In this example I choose “Button”.
This opens the dialog “Word Options”, where the tab “Customize” is selected.

I select the button in the left pane, and click the button “Add >>” in the middle of the dialog.
Alternatively you can set the icon and adjust the name of the button by clicking the “Modify” button in the dialog.

This opens a second dialog box, where we have a different symbol for our button and to choose another display name and be able to enter it.
Click OK when you’re done.

 

And then click OK to close the “Word Options”.Our mouse pointer is changed to an arrow with a cassette recorder.

Every action we perform is included in our macro.
When you are finished recording the macro, click back on “Macro” in the ribbon, and select “Stop Recording” from the drop-down menu.

Macro

The button with the macro we just created is now added to our “Quick Access” toolbar.

Whenever we click, this macro will be executed.

Macro Change

The Macro change is for those of us who fail a bit of Visual Basic.
For those of us for whom this is all new, it is better macro to delete and recreate their own macro.
To modify a macro, click the back button “Macro” in the ribbon, and select “View macros”.
This opens the dialog “Macros”.
The dialog box that appears shows all macros that we had already made.
To delete a macro, select it in the left pane, and click the “Delete” button.
Those who want to modify a macro, select the macro, and click the “Edit” button.
This opens the ‘Microsoft Visual Basic “:

Is it only your house number or phone number that has changed, then this can be customize.
But again, you know nothing of Visual Basic, you better stay here.
Close the “Microsoft Visual Basic” window by clicking on the red X at top right of the window.

Awesome!
You've completed Lesson 56
START NEXT LESSON