Sir need little help.
I have two videos in each slide of my powerpoint presentation.It has 10 slides.Now I want to replace old videos with new one in each slides so that all animations remains unchanged.
That means in animation pane sequance order also remains unchanged(in selection pane z-order aslo remains unchanged).I tried to make some function but its not working. Any solution will be appreacitated.
There are three animation in my video shape i.e Appear(entry animation), Play, Disappear(exit animation). Using below function gives only ones animation i.e Disappear(exit animation).

Function replace_video(Video_shapeName As String, sld As Long, videoPath As Variant)


Dim i As Long
Dim p As Long
Dim oSld As Slide
Dim shpNew As Shape
Dim shp1 As Shape
Dim k As String
Dim trg_delay As Double
Dim dur As Double


Set oSld = ActivePresentation.Slides(sld)
Set shp1 = oSld.Shapes(Video_shapeName) 


Set shpNew = oSld.Shapes.AddMediaObject2(videoPath, False, True, 10, 10)
shpNew.Left = shp1.Left
shpNew.Width = shp1.Width
shpNew.Height = shp1.Height
shpNew.Top = shp1.Top


For i = oSld.TimeLine.MainSequence.count To 1 Step -1
'using "is" opeartor to compare refrences
     If shp1 Is oSld.TimeLine.MainSequence.item(i).Shape Then
          oSld.TimeLine.MainSequence.item(i).Shape = shpNew
          p = oSld.TimeLine.MainSequence(i).Timing.TriggerType
          trg_delay = oSld.TimeLine.MainSequence(i).Timing.TriggerDelayTime
          dur = oSld.TimeLine.MainSequence(i).Timing.Duration
          'oSld.TimeLine.MainSequence(i).Timing.TriggerType = msoAnimTriggerAfterPrevious
          shp1.Delete
          shpNew.Name = Video_shapeName
          oSld.TimeLine.MainSequence(i).Timing.TriggerType = p
          oSld.TimeLine.MainSequence(i).Timing.TriggerDelayTime = trg_delay
          oSld.TimeLine.MainSequence(i).Timing.Duration = dur


    End If
Next i


End Function