Assigning Slide Times with a Macro in Powerpoint 2007

Microsoft Powerpoint, Tips & Tricks Add comments

mspowerpointtweak.pngWhen you use the Rehearse Timings feature as described in the previous section, you might get interrupted during a slide and forget to click the Pause button in the Rehearsal toolbar. Rather than starting from scratch, you can complete the slide show and then adjust the time for the interrupted slide by hand. To do this, navigate to the slide (either in Normal view or Slide Sorter view), choose the Animations tab, and then adjust the time displayed in the Automatically After spin button.

TIP

When you specify a time using the Automatically After control, it’s often faster to use the text box to type the time.That is, you select the entire displayed time and then type the new time using the mm:ss format, where mm is the number of minutes and ss is the number of seconds.

What if you need to adjust the time of multiple slides? If want to assign the same time to each slide, select all the slides and then edit the time displayed in the Automatically After control. PowerPoint assigns that time to all the selected slides.

A more likely scenario is that the slides you want to change require different times. In this case, you don’t have any choice except to modify the slide times one by one using the Automatically After control.

However, what if you need to adjust all the times by the same amount? For example, you might decide that you rushed through the rehearsal and that the time for each slide should be increased by 30 seconds. Similarly, if you set up an automatic slide show that has 20 slides and the total time is 5 minutes (300 seconds) less than what is required, you can fix the problem by adding 15 seconds to each slide.

You can adjust the timing of each slide by hand, of course, but this is the sort of repetitive task for which VBA was made. Listing 1 presents a macro that adjusts the time of every slide in the active presentation by a specified number of seconds.

Listing 1 A VBA Macro that Adjusts the Advance Time of Each Slide by a Specified NumberA VBA Macro that Adjusts the Advance Time of Each Slide by a Specified Number

The procedure begins by using the InputBox function to prompt for the number of seconds by which the slide times are to be adjusted (this can be a positive or negative number). This value is stored in the varAdjustTime variable. After making sure that Cancel isn’t clicked (if it were, the procedure exits), the macro then uses a For Each…Next loop to run through all the slides in the active presentation. For each slide’s SlideShowTransition object, the varAdjustTime value is added to the AdvanceTime property. When the loop is done, the macro switches to Slide Sorter view to see the new timings.

Technorati Tags: , ,

Popularity: 2% [?]

Related Post

  • Calculating the Average Slide Time in Powerpoint 2007
  • Setting Up an Automatic Slide Show in Powerpoint 2007
  • Creating a Summary Slide with a Macro in PowerPoint 2007
  • Linking to the Last Slide Viewed in Powerpoint 2007
  • Hiding a Slide Master Object on One Slide in PowerPoint 2007
  • Don't Find What You're Looking For? Please Try Here...

    Google
     

    Leave a Reply

    WP Theme & Icons by N.Design Studio
    Entries RSS Comments RSS Add to Technorati Favorites Log in