Creating Macros in PowerPoint
Creating Macros in PowerPoint
As we become familiar with the applications we commonly use, we become more efficient. For example, the first few times you use PowerPoint you probably use the Insert menu to insert a new slide (Insert > New Slide). However, as you become more familiar with this task, you move on to using the key command ( Ctrl + M) for the same function. This is one way in which we become more effective users of software. Another example of streamlined software use is creating macros to perform tasks that you do frequently. A macro is a series of commands stored in a Visual Basic module that you run whenever you need to perform a task. Nearly all common desktop applications allow you to use macros, but sometimes they are hard to create. PowerPoint is a simple application in which to use macros because you don't need to know how to use Visual Basic to create a macro. In fact, you can record a macro in PowerPoint and the application writes the necessary code. Specifically, you record a macro just as you record music with a tape recorder. Then you run the macro to repeat, or "play back," the commands. Macros have many uses, but they are ideal for these instances:
Combining multiple commands into one Automatically performing a series of tasks General editing/formatting tasks that are repeated again and again
Before you record or write a macro, you need to plan the steps and commands you want the macro to perform. Each macro is stored in a new Visual Basic module attached to the open presentation. You should always create macros in a presentation (rather than in a template) because a template becomes part of a presentation and macros attached to a template are not copied to a presentation. Note You can also write macros by entering Visual Basic commands in Visual Basic Editor. In Visual Basic Editor, you can edit macros, copy macros from one module to another, copy macros between presentations, rename the modules that store macros, and export modules. If you are up for this challenge, see the Visual Basic Editor Help file.
To record a macro in PowerPoint 1. 2. Open the PowerPoint presentation. Select Tools > Macro > Record New Macro . . . The Record Macro dialog appears.
3.
Under Macro name, give the macro an appropriate name. For example, if you are using the macro to align objects, call the macro align_object, rather than Macro1. Once you become a proficient user of macros, you will end up with a long list of macros at times and a simple numbering will make them difficult to differentiate. Notice that the macro is stored in the presentation.
4.
5. 6.
Click OK. The Stop Macro button appears on top of the presentation. At this point in time, the macro is "running". It is recording anything you do with the keyboard or the mouse. So, choose your actions to include in the macro. Click Stop when you are finished. The macro is stored and recorded for use in this presentation.
To run a macro 1. 2. 3. Open the presentation that contains the macro. Select Tools > Macro > Macros . . . Under Macro name select the macro to run. Click Run. The macro executes.