Timing.TriggerShape Property
Sets or returns a Shape object that represents the shape associated with an animation trigger. Read/write.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
Property TriggerShape As Shape
Get
Set
'Usage
Dim instance As Timing
Dim value As Shape
value = instance.TriggerShape
instance.TriggerShape = value
Shape TriggerShape { get; set; }
Property Value
Type: Microsoft.Office.Interop.PowerPoint.Shape
Shape
Examples
The following example adds two shapes to a slide, adds an animation to a shape, and begins the animation when the other shape is clicked.
Sub AddShapeSetTiming()
Dim effDiamond As Effect
Dim shpRectangle As Shape
Set shpOval = _
ActivePresentation.Slides(1).Shapes. _
AddShape(Type:=msoShapeOval, Left:=400, Top:=100, Width:=100, Height:=50)
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
.TriggerShape= shpOval
End With
End Sub