1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
'Mon code
Private Sub CommandButton1_Click()
Call AddShapeSetTiming
End Sub
Sub AddShapeSetTiming()
Dim effDiamond As Effect
Dim shpRectangle As Shape
Dim shpOval1 As Shape
Dim shpOval2 As Shape
Set shpOval1 = _
ActivePresentation.Slides(1).Shapes. _
AddShape(Type:=msoShapeOval, Left:=400, Top:=100, Width:=100, Height:=50)
Set shpOval2 = _
ActivePresentation.Slides(1).Shapes. _
AddShape(Type:=msoShapeOval, Left:=400, Top:=200, 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:=msoAnimEffectPathDiagonalDownRight, trigger:=msoAnimTriggerOnShapeClick)
With effDiamond.Timing
.Duration = 5
.TriggerShape = shpOval1
End With
shpOval1.ActionSettings(ppMouseOver).Run = "Popup"
shpOval2.ActionSettings(ppMouseOver).Run = "Popup"
End Sub |
Partager