MSDN sample code - TriggerType error?

  • Thread starter Thread starter Geoff Cox
  • Start date Start date
G

Geoff Cox

Hello

code below taken from MSDN

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbapp10/html/ppproTriggerType.asp

comes up with error "Timing(unknown member): Invalid request"

debug pointing at

.TriggerType = msoAnimTriggerOnShapeClick

Can you see where the error is?

Thanks

Geoff


Sub AddShapeSetTiming()

Dim effDiamond As Effect
Dim shpRectangle As Shape

Set shpRectangle = ActivePresentation.Slides(1).Shapes _
.AddShape(Type:=msoShapeRectangle, Left:=100, _
Top:=100, Width:=50, Height:=50)
Set effDiamond =
ActivePresentation.Slides(1).TimeLine.MainSequence _
.AddEffect(Shape:=shpRectangle,
effectId:=msoAnimEffectPathDiamond)

With effDiamond.Timing
.Duration = 5
.TriggerType = msoAnimTriggerOnShapeClick
.TriggerDelayTime = 3
End With

End Sub
 
You cant add triggered events to the maintimeline.
Try adding to the interactive timeline like this maybe

Sub AddShapeSetTiming()

Dim effDiamond As Effect
Dim shpRectangle As Shape

Set shpRectangle = ActivePresentation.Slides(1).Shapes _
..AddShape(Type:=msoShapeRectangle, Left:=100, _
Top:=100, Width:=50, Height:=50)
Set effDiamond =
ActivePresentation.Slides(1).TimeLine.InteractiveSequences.Add _
..AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectPathDiamond, _
trigger:=msoAnimTriggerOnShapeClick)

With effDiamond.Timing
..Duration = 5
..TriggerDelayTime = 3
End With

End Sub
--

Did that answer the question / help?
_____________________________
John Wilson
Microsoft Certified Office Specialist
http://www.technologytrish.co.uk/ppttipshome.html
 
You cant add triggered events to the maintimeline.
Try adding to the interactive timeline like this maybe

Sub AddShapeSetTiming()

Dim effDiamond As Effect
Dim shpRectangle As Shape

Set shpRectangle = ActivePresentation.Slides(1).Shapes _
.AddShape(Type:=msoShapeRectangle, Left:=100, _
Top:=100, Width:=50, Height:=50)
Set effDiamond =
ActivePresentation.Slides(1).TimeLine.InteractiveSequences.Add _
.AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectPathDiamond, _
trigger:=msoAnimTriggerOnShapeClick)

With effDiamond.Timing
.Duration = 5
.TriggerDelayTime = 3
End With

End Sub

Thanks John - works fine!

Cheers

Geoff

PS is there a way of letting MS know about this?
 
Back
Top