Create a macro

ShowRecord a macro

  1. On the Tools menu, point to Macro, and then click Record New Macro.
  2. In the Macro name box, enter a name for the macro (macro: An action or a set of actions that you can use to automate tasks. Macros are recorded in the Visual Basic for Applications programming language.).

 Note   The first character of the macro name must be a letter. Other characters can be letters, numbers, or underscore characters. Spaces are not allowed in a macro name; an underscore character works well as a word separator.

  1. In the Store macro in box, click the location where you want to store the macro.
  2. If you want to include a description of the macro, type it in the Description box.
  3. Click OK.
  4. Record the actions you want for the macro, and then on the Stop Recording toolbar (toolbar: A bar with buttons and options that you use to carry out commands. To display a toolbar, press ALT and then SHIFT+F10.), click Stop Recording Button image.

ShowCreate a macro using Microsoft Visual Basic

  1. In Microsoft PowerPoint, on the Tools menu, point to Macro, and then click Visual Basic Editor.
  2. In Microsoft Visual Basic Editor (Microsoft Visual Basic Editor: An environment in which you can edit macros that you've recorded and write new macros and Visual Basic for Applications programs.), on the Insert menu, click Module.
  3. Type or copy your code into the code window of the module (module: A collection of declarations, statements, and procedures stored together as one named unit. There are two types of modules: standard modules and class modules.).
  4. If you want to run the macro (macro: An action or a set of actions that you can use to automate tasks. Macros are recorded in the Visual Basic for Applications programming language.) from the module window, press F5.
  5. When you're finished writing your macro, on the File menu, click Close and Return to Microsoft PowerPoint.

ShowCopy part of a macro to create another macro

  1. Open the presentation that contains the macro (macro: An action or a set of actions that you can use to automate tasks. Macros are recorded in the Visual Basic for Applications programming language.) you want to copy.
  2. On the Tools menu, point to Macro, and then click Macros.
  3. In the Macro name box, enter the name of the macro that you want to copy.
  4. Click Edit.
  5. Select the lines of the macro you want to copy. To copy the entire macro, make sure to include the Sub and End Sub lines in the selection.
  6. Click Copy Button image, switch to the module (module: A collection of declarations, statements, and procedures stored together as one named unit. There are two types of modules: standard modules and class modules.) where you want to place the code, and then click Paste Button image.
 
 
Applies to:
PowerPoint 2003