View Single Post
  #2  
Old June 4th, 2010, 07:08 PM posted to microsoft.public.powerpoint
David Marcovitz[_2_]
external usenet poster
 
Posts: 130
Default vba and animations

Unfortunately, there is not much available on this topic. I think the
most you are going to find is on Shyam's site:

http://skp.mvps.org/ppttimeline1.htm

I didn't discuss animations in my book about PowerPoint and VBA.

--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/


On 6/4/10 12:14 PM, Christine Fournier wrote:
Hi,

I am using VBA in PowerPoint 2003.
I'm new to VBA and I find that looking for informations about animation is
quite difficult. When I want to know what informations to give when I want to
insert a shape, it's quite easy because I can record a macro and then use
this information. Unfortunately, it's not possible for animation. Do you know
of any good tutorial about this ? For example, I would like to know how to
lenghten the path if I'm using msoAnimEffectPathRight or how to include a
sound with it.

On another subject, there is still no answer to my question here and I
haven't found an answer by myself :

http://www.microsoft.com/office/comm...werpoint&fltr=

Thank you for your help. It is very appreciated.

Christine./
Exemple of code I am using, exploring userform and animations :

Private Sub CheckBox1_Click()
etoile = True
End Sub

Private Sub CheckBox2_Click()
carre = True
End Sub

Private Sub CheckBox3_Click()
cercle = True
End Sub

Private Sub CommandButton1_Click()
Me.hide
If etoile = True Then
Set formeEtoile =
ActivePresentation.SlideShowWindow.View.Slide.Shap es.AddShape(msoShape5pointStar, 67.75, 60.12, 97.38, 84.75)
With formeEtoile
.Fill.ForeColor.RGB = RGB(255, 255, 0)
.Line.Weight = 4#
.Line.ForeColor.RGB = RGB(255, 102, 0)
.Line.BackColor.RGB = RGB(255, 255, 255)
End With
End If
If carre = True Then
Set formeCarre =
ActivePresentation.SlideShowWindow.View.Slide.Shap es.AddShape(msoShapeRectangle, 67.75, 191.38, 88.88, 78)
With formeCarre
.Fill.ForeColor.SchemeColor = ppAccent2
.Fill.Transparency = 0#
.Line.Weight = 4#
.Line.ForeColor.RGB = RGB(128, 128, 128)
.Line.BackColor.RGB = RGB(255, 255, 255)
End With
End If
If cercle = True Then
Set formeCercle =
ActivePresentation.SlideShowWindow.View.Slide.Shap es.AddShape(msoShapeOval,
67.75, 401.5, 122.75, 122.75)
With formeCercle
.Fill.ForeColor.RGB = RGB(255, 0, 255)
.Line.Weight = 4#
.Line.ForeColor.RGB = RGB(153, 204, 0)
.Line.BackColor.RGB = RGB(255, 255, 255)
End With
End If
If etoile = True And trajet = True Then
With
ActivePresentation.SlideShowWindow.View.Slide.Time Line.MainSequence.AddEffect(Shape:=formeEtoile, effectid:=msoAnimEffectPathRight)
.Timing.SmoothEnd = False
.Timing.SmoothStart = False
.Timing.Speed = 1
.Timing.TriggerType = msoAnimTriggerAfterPrevious
.Timing.TriggerDelayTime = 1
End With
End If
If etoile = True And emphase = True Then
With
ActivePresentation.SlideShowWindow.View.Slide.Time Line.MainSequence.AddEffect(Shape:=formeEtoile, effectid:=msoAnimEffectSpin)
.Timing.Duration = 2
.Timing.TriggerType = msoAnimTriggerAfterPrevious
.Timing.TriggerDelayTime = 1
End With
End If
If carre = True And trajet = True Then
With
ActivePresentation.SlideShowWindow.View.Slide.Time Line.MainSequence.AddEffect(Shape:=formeCarre, effectid:=msoAnimEffectPathRight)
.Timing.SmoothEnd = False
.Timing.SmoothStart = False
.Timing.Speed = 1
.Timing.TriggerType = msoAnimTriggerAfterPrevious
.Timing.TriggerDelayTime = 1
End With
End If
If carre = True And emphase = True Then
With
ActivePresentation.SlideShowWindow.View.Slide.Time Line.MainSequence.AddEffect(Shape:=formeCarre, effectid:=msoAnimEffectFlicker)
.Timing.Duration = 2
.Timing.TriggerType = msoAnimTriggerAfterPrevious
.Timing.TriggerDelayTime = 1
End With
End If
If cercle = True And trajet = True Then
With
ActivePresentation.SlideShowWindow.View.Slide.Time Line.MainSequence.AddEffect(Shape:=formeCercle, effectid:=msoAnimEffectPathRight)
.Timing.SmoothEnd = False
.Timing.SmoothStart = False
.Timing.Speed = 1
.Timing.TriggerType = msoAnimTriggerAfterPrevious
.Timing.TriggerDelayTime = 1
End With
End If
If cercle = True And emphase = True Then
With
ActivePresentation.SlideShowWindow.View.Slide.Time Line.MainSequence.AddEffect(Shape:=formeCercle, effectid:=msoAnimEffectWave)
.Timing.Duration = 2
.Timing.TriggerType = msoAnimTriggerAfterPrevious
.Timing.TriggerDelayTime = 1
End With
End If
End Sub

Private Sub OptionButton1_Click()
trajet = True
End Sub

Private Sub OptionButton2_Click()
emphase = True
End Sub