Create a macro

Record a macro

  1. Set the security level to Medium or Low.

    How?

    1. On the Tools menu, point to Macro, and then click Security.
    2. On the Security Level tab, select the security level you want to use, and then click OK.
  2. On the Tools menu, point to Macro, and then click Record New Macro.
  3. In the Macro name box, enter a name for the macro.

    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.

  4. In the Store macro in box, click the location where you want to store the macro.
  5. If you want to include a description of the macro, type it in the Description box.

  6. Click OK.
  7. Record the actions you want for the macro, and then on the Stop Recording toolbar, click Stop Recording .

Create 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, on the Insert menu, click Module.
  3. Type or copy your code into the code window of the module.
  4. If you want to run the macro 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.

Copy part of a macro to create another macro

  1. Set the security level to Medium or Low.

    How?

    1. On the Tools menu, point to Macro, and then click Security.
    2. On the Security Level tab, select the security level you want to use, and then click OK.
  2. Open the presentation that contains the macro you want to copy.
  3. On the Tools menu, point to Macro, and then click Macros.
  4. In the Macro name box, enter the name of the macro that you want to copy.
  5. Click Edit.
  6. 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.
  7. Click Copy , switch to the module where you want to place the code, and then click Paste .