J
John Crawford
I am playing with VBA in PP just to see whether I can make things
happen.
I am trying to create a multimedia shape to play a song, and what I
want to do is start it as soon as it is created.
The following code creates it, and when I look at the values they
are all what I expected.
==============================
With ActivePresentation.Slides(1).Shapes _
.AddMediaObject(FileName:="e:\MS Office Data\PowerPoint Data\The
Celts Enya.wav", _
Left:=ActivePresentation.Slides(1).Shapes(3).Left, _
Top:=ActivePresentation.Slides(1).Shapes(3).Top, _
Width:=10, Height:=10)
.ZOrder (msoSendToBack)
With .AnimationSettings
With .PlaySettings
.PlayOnEntry = True
.LoopUntilStopped = msoCTrue
.StopAfterSlides = 1
.PauseAnimation = msoFalse
End With
.AdvanceMode = ppAdvanceOnTime
.AdvanceTime = 0
.Animate = msoCTrue
End With
End With
=============================
However whan I run the code that creates it I want it to start
playing immediately. However the shape is created ok, but I must click
to get it to start. If, however I have the created shape, and start the
show again (with the creation disabled so I do not get a second
instance) it does start right away.
Is there any way that I can get it to do as I need?
Thanks in advance
John Crawford
happen.
I am trying to create a multimedia shape to play a song, and what I
want to do is start it as soon as it is created.
The following code creates it, and when I look at the values they
are all what I expected.
==============================
With ActivePresentation.Slides(1).Shapes _
.AddMediaObject(FileName:="e:\MS Office Data\PowerPoint Data\The
Celts Enya.wav", _
Left:=ActivePresentation.Slides(1).Shapes(3).Left, _
Top:=ActivePresentation.Slides(1).Shapes(3).Top, _
Width:=10, Height:=10)
.ZOrder (msoSendToBack)
With .AnimationSettings
With .PlaySettings
.PlayOnEntry = True
.LoopUntilStopped = msoCTrue
.StopAfterSlides = 1
.PauseAnimation = msoFalse
End With
.AdvanceMode = ppAdvanceOnTime
.AdvanceTime = 0
.Animate = msoCTrue
End With
End With
=============================
However whan I run the code that creates it I want it to start
playing immediately. However the shape is created ok, but I must click
to get it to start. If, however I have the created shape, and start the
show again (with the creation disabled so I do not get a second
instance) it does start right away.
Is there any way that I can get it to do as I need?
Thanks in advance
John Crawford