Sir I need help for simple code which I can not configure.


I have rectangular shape(say Rectangle1) with two different animations ie motion path(Right) & grow/shrink.
I want to add another rectangular shape(say Rectangle2) same as Rectangle1 with shape & animation but want to give animation delay
4 seconds to 1st animation(motion path),5 second to 2nd animation(grow/shrink).
I tried the code below it only give animation delay to motion path. But how I configure for other [2nd animation(grow/shrink)].
Sub addAnnimation()


Dim oeff As Effect


Dim t As Long


Dim l As Long


Dim h As Long


Dim w As Long


Dim shp As Shape


Dim recnewShp As Shape


On Error Resume Next




Set shp = Application.Presentations(1).Slides(1).Shapes("Rectangle1")


If shp Is Nothing Then GoTo err


shp.PickupAnimation


shp.PickUp


'Capture properties of exisitng Rectangle1 such as location and size


With shp


t = .Top


l = .Left


h = .Height


w = .Width


End With


Set recnewShp = Application.Presentations(1).Slides(1).Shapes.AddShape(shp.AutoShapeType, l, t, w, h)


recnewShp.Apply


recnewShp.ApplyAnimation


Set oeff = Application.Presentations(1).Slides(1).TimeLine.MainSequence.FindFirstAnima tionFor(recnewShp)


oeff.Timing.TriggerDelayTime = 4


oeff.Timing.TriggerType = msoAnimTriggerWithPrevious




recnewShp.Name = "Rectangle2"


Exit Sub


err:


MsgBox "Error, please select a shape."


End Sub