MSDN sample code - TriggerType error?

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
 
G

Guest

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
 
G

Geoff Cox

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top