Share via


Effect.TextRangeStart Property

PowerPoint Developer Reference

Returns or sets the start of a text range. Read-only.

Syntax

expression.TextRangeStart

expression   A variable that represents a Effect object.

Return Value
Long

Example

This example adds a shape with text and rotates the shape without rotating the text.

Visual Basic for Applications
  Sub SetTextRange()
    Dim shpStar As Shape
    Dim sldOne As Slide
    Dim effNew As Effect
Set sldOne = ActivePresentation.Slides(1)
Set shpStar = sldOne.Shapes.AddShape(Type:=msoShape5pointStar, _
    Left:=32, Top:=32, Width:=300, Height:=300)

shpStar.TextFrame.TextRange.Text = "Animated shape."

Set effNew = sldOne.TimeLine.MainSequence.AddEffect(Shape:=shpStar, _
    EffectId:=msoAnimEffectPath5PointStar, Level:=msoAnimateTextByAllLevels, _
    Trigger:=msoAnimTriggerAfterPrevious)
With effNew
    If .<strong>TextRangeStart</strong> = 0 And .TextRangeLength &gt; 0 Then
        With .Behaviors.Add(Type:=msoAnimTypeRotation).RotationEffect
            .From = 0
            .To = 360
        End With
        .Timing.AutoReverse = msoTrue
    End If
End With

End Sub

See Also