Word > Word 2003 Advanced > Working with Macros and Toolbars

Run and Edit a Macro

It is a good idea to test run a macro before assigning a toolbar button or keyboard shortcut to it. If the macro does not work as required it will need to be edited.

VBA is used to edit macros in Word. If a macro cannot be edited using VBA, it needs to be deleted and re-recorded.

Run a Macro

  1. Click Tools > Macro > Macros or press Alt + F8
  2. Select the macro you want to edit

  3. Select the macro that you want to run
  4. Click Run

Edit a Macro

A macro can be edited using VBA if it is not working. Sometimes when recording macros, Word enters a lot of additional lines of code that are not necessary. These lines can be removed to tidy up the macro code.

  1. Click Tools > Macro > Macros or press Alt + F8
  2. Select the macro that you want to edit
  3. Click Edit
  4. The macro below was recorded to change the orientation of a document's pages from portrait to landscape. Word added alot of additional code for all the other options in the Page Setup dialogue box
  5. No other settings were changed so this code is unnecessary and can be deleted. Select all the unnecessary lines of code and press the Delete key on the keyboard

    Unnecessary VBA code can be deleted

  6. Click the Save button on the Standard toolbar
  7. Close the Visual Basic Editor window

Follow us on

Facebook  Twitter  You Tube