次の方法で共有


Effect.TextRangeStart プロパティ (PowerPoint)

テキスト範囲の開始を表す値を設定します。 値の取得のみ可能です。

構文

TextRangeStart

Effect オブジェクトを表す変数。

戻り値

Long

次の使用例は、テキスト付きの図形を追加し、テキストは回転させずに図形を回転させます。

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 .TextRangeStart = 0 And .TextRangeLength > 0 Then
            With .Behaviors.Add(Type:=msoAnimTypeRotation).RotationEffect
                .From = 0
                .To = 360
            End With
            .Timing.AutoReverse = msoTrue
        End If
    End With

End Sub

関連項目

Effect オブジェクト

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。