I was embedding multiple SWF files into PowerPoint, unfortunately when I set the ScaleMode to fit to area it would reset the next time I opened the PowerPoint file. A search of the internet did not come up with a solution to my problem. Since I couldn’t find out how to fix it I created a kludge to get the SWF videos to be sized correctly. To do this I created a button on the first slide.
I then created a macro to go along with the button.
Private Sub CommandButton1_Click()
Dim oSlide As Slide
For Each oSlide In ActivePresentation.Slides
Dim oShape As Shape
For Each oShape In oSlide.Shapes
If oShape.Name = "ShockwaveFlash1" Then
Dim oShockwave As ShockwaveFlash
Set oShockwave = oShape.OLEFormat.Object
oShockwave.ScaleMode = 2
The macro goes through each slide and sees if there is a SWF object named “ShockwaveFlash1”. If there is then the then the ScaleMode is set to 2, which is fit to the viewing area on the slide. If you renamed the SWF control name to something else, or have more than one SWF video on the page, then the code would need to be changed to reflect it. I noticed that the code didn’t work unless the slide was shown on the screen, which caused me to have to go through each slide. The code that moves through each slide is SlideShowWindows(1).View.Next line.
For some reason each Control on a slide is a Shape object. The SWF video is an OLE object. The last line of code before ending the Sub makes sure we go back to the first video.
This short screen cast goes over how to add a SWF to a PowerPoint slide: http://screencast.com/t/35dmmRfsdI