VB for automatically playing AVI

R

Rod R.

I've recently upgraded to PP2003 and see that there is a new Custom
Animation option that will play an inserted .AVI automatically (with
Previous). I don't think that was an option with previous verisons of PP.
What is the VB code to make that happen?

With previous versions of PP, I've created my VB by recording a macro of the
steps I wanted to take, and then modifying it to suit my needs. Here's the
code I used to click on the AVI to play....


ActiveWindow.Selection.SlideRange.Shapes.AddMediaObject(FileName:=relative_f
ile, Left:=240#, Top:=180#).Select

With oSlide.SlideShowTransition
.EntryEffect = ppEffectNone
.AdvanceOnClick = msoTrue
.AdvanceOnTime = msoFalse
.SoundEffect.Type = ppSoundNone
End With

Now I'd like to have it start automatically. When I tried setting those
options while recording a macro, this is all I got...

Sub Macro3()
'
' Macro recorded 6/22/2004 by Rod
'
ActiveWindow.Selection.SlideRange.Shapes("Picture 3").Select
ActiveWindow.Selection.Unselect
End Sub

Thanks in advance for your help.
 
R

Rod R.

Thanks, while their example didn't do exactly what I wanted (had to click
to get it started), I did a search on playsettings, and found another
article that had the code I needed. When the slide appears, the avi starts
automatically, and when it is completed, it moves on to the next slide.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbapp10/htm
l/ppproPlaySettings.asp

With ActivePresentation.Slides(slide_no).Shapes
Set oMovie = .AddMediaObject(FileName:=relative_file,
Left:=240#, Top:=180#)
With oMovie.AnimationSettings.PlaySettings
.PlayOnEntry = msoTrue
.HideWhileNotPlaying = msoFalse
End With
End With

Thanks again,

rod
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top