Skip to content

Latest commit

 

History

History
63 lines (38 loc) · 1.27 KB

PowerPoint.Timing.RepeatCount.md

File metadata and controls

63 lines (38 loc) · 1.27 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Timing.RepeatCount property (PowerPoint)
vbapp10.chm653007
vbapp10.chm653007
PowerPoint.Timing.RepeatCount
71d31607-6006-f2c0-cfa3-3711791331bc
06/08/2017
medium

Timing.RepeatCount property (PowerPoint)

Sets or returns the number of times to repeat an animation. Read/write.

Syntax

expression. RepeatCount

expression A variable that represents a Timing object.

Return value

Long

Example

This example creates a shape and adds an animation to it, then repeats the animation twice.

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 ' Length of effect.
        .RepeatCount = 2 ' How many times to repeat.
    End With

End Sub

See also

Timing Object

[!includeSupport and feedback]