Chapter 14. Macros: Putting Slideshows on Autopilot


If you're a programmer-type, you can create macros to beef up a straightforward Web- or kiosk-delivered presentation and turn it into an interactive program. A macro is a series of instructions written in the Visual Basic for Applications language (often called VBA ). With macros, you can make PowerPoint perform commands automatically, when you're not there to click a button. Best of all, you set macros to kick in when your audience performs a certain action.

Here are just a few examples of the kinds of things you can do with macros:

  • Present a question on one slide and then use the audience's answer to determine which slide to show next .

  • Ask your audience for information and then send the gathered information to another computer.

  • Give your audience a way to print (perhaps you let them print the presentation itself or other handouts).

  • Add pre-built components such as a checkbox, a calendar, or a media player to your slides and then customize them so they do whatever you want them to.

In addition to letting your audience interact with your slideshow, you can also use macros to help streamline and control the slideshow editing process itself. Say you work for a large corporation that maintains strict guidelines for all the presentations its employees build. You can create a macro that enforces those guidelines every time someone edits a slide. Maybe your macro searches slide text for verboten phrases (like the old name of a renamed product) or formatting (like wacky font colors) and fixes them automatically.

Programming in Visual Basic for Applications is too huge a topic for a book on PowerPoint. Instead, this chapter shows you what you need to do in PowerPoint to display the VBA editor, create a simple example macro, and run macros that you (or others) have programmed in VBA. It also acquaints you with the important security issues that surround macros.


Note: PowerPoint puts restrictions on the things you can do with macros, but it gives a lot more latitude to the things you can do with add-ins . Add-ins are mini-programs that add useful features to PowerPoint. So depending on what you want to domaybe you want your macro to run automatically as soon as the slideshow runsyou may need to create a PowerPoint add-in. For more on add-ins, check out the box on page 423.
NOSTALGIA CORNER
Goodbye, Macro Recorder

Earlier versions of PowerPoint let you create a macro and save it to a macro-enabled PowerPoint file without having to know a lick of VBA. All you had to do was fire up the macro recorder, step through a list of taskslike select next slide, change background color to chartreuse, add company logo to bottom of slideand then tell PowerPoint the name of your newly recorded macro.

Recording and running macros saved time. Instead of sitting at your desk punching the same keystroke series for 136 slides, you could tell PowerPoint to do it for you. Macros improved the consistency of slideshows, too. Humans often make mistakes when they try to repeat the same steps over and over again ( especially if it's been a while since lunch ), but computer programs don't.

With the addition of slide master layouts (Chapter 5) in PowerPoint 2007, much of the need for creating garden-variety formatting macros has disappearedand with it, the ability to record macros.

Yes, you read that right. Microsoft apparently believes that the only folks who want to create macros in PowerPoint 2007 are developers who are already well versed in VBA, so they removed the macro recorder. Whether you agree or not, the only way to create a macro in PowerPoint 2007 is to roll up your sleeves and get busy with VBA. This chapter gets you off to a good start.





PowerPoint 2007
PowerPoint 2007
ISBN: 1555583148
EAN: N/A
Year: 2006
Pages: 129

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net