Microsoft KB Archive/291876

From BetaArchive Wiki

Article ID: 291876

Article Last Modified on 3/2/2007



APPLIES TO

  • Microsoft Office PowerPoint 2007
  • Microsoft Office PowerPoint 2003
  • Microsoft PowerPoint 2002 Standard Edition
  • Microsoft PowerPoint 2000 Standard Edition



This article was previously published under Q291876

SUMMARY

This article describes how to control a Shockwave Flash Control on a slide in your presentation. For more information about how to insert the control in your slide, click the following article number to view the article in the Microsoft Knowledge Base:

291875 How to add a Shockwave Flash control to a slide in PowerPoint


MORE INFORMATION

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. Note The following macro examples work only in PowerPoint. Visual Basic for Applications macros are not supported by the Microsoft PowerPoint Viewer. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

230746 PPT: Viewer: Presentation Macros Don't Run Within the Viewer


NOTE: Neither the PowerPoint Viewer nor the Macintosh versions of PowerPoint support the use of ActiveX controls. Only Microsoft PowerPoint 97 and later can use ActiveX controls.

To create the code samples, follow these steps:

  1. Press ALT+F11 to start Visual Basic Editor.
  2. On the Insert menu, click Module.
  3. Type the following code samples in the module.

Start

The following subroutine starts the Flash animation:

Sub PlayShock()
   Slide#.ShockwaveFlash#.Play
End Sub
                

NOTE: Slide# is the slide where the Shockwave Flash control is located. ShockwaveFlash# is the name of the Shockwave Flash Control on the slide; replace this with the actual name of the control.

Stop

The following subroutine stops the animation:

Sub StopShock()
   Slide#.ShockwaveFlash#.StopPlay
End Sub
                

Rewind

The following subroutine rewinds the animation back to the beginning:

Sub RewindShock()
   Slide#.ShockwaveFlash#.Rewind
End Sub
                

Adding and Configuring an Action Button

Use the following steps to link the code to the action buttons of your choice.

  1. To create the action button, follow these steps:
    • PowerPoint 2007


On the Home tab, click More in the Drawing group in the AutoShape area, and then click Action Button: Custom.

    • PowerPoint 2000, PowerPoint 2002, and PowerPoint 2003


On the Drawing toolbar, click AutoShapes, point to Action Buttons, and then click the Action Button: Custom button.

  1. Draw the action button on the slide.

In the Action Settings dialog box, click the Mouse Click tab. Click Run Macro.

NOTE: You must first create the above macros to have this option available. In the list of macros, select the name of the macro you want to attach to the button. Click OK.

REFERENCES

For additional information about using ActiveX controls, click the following article number to view the article in the Microsoft Knowledge Base:

222703 How to manipulate ActiveX controls through VBA macros



Additional query words: OfficeKBHowTo vba inf PPT PPT2007

Keywords: kbslideshow kbdtacode kbhowto KB291876