Table of contents
TOC
折叠目录
展开目录

AnimationBehavior.SetEffect 属性 (PowerPoint)AnimationBehavior.SetEffect Property (PowerPoint)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

返回一个SetEffect对象的动画行为。只读的。Returns a SetEffect object for the animation behavior. Read-only.

语法Syntax

表达式SetEffectexpression. SetEffect

表达式_一个表示AnimationBehavior对象的变量。_expression A variable that represents a AnimationBehavior object.

返回值Return Value

SetEffectSetEffect

注解Remarks

您可以使用SetEffect对象返回要设置属性的值。You can use the SetEffect object returned to set the value of a property.

示例Example

以下示例在活动演示文稿的第一张幻灯片中添加一个形状,并设置一个设置效果动画动作。The following example adds a shape to the first slide of the active presentation and sets a set effect animation behavior.

Sub ChangeSetEffect()

    Dim sldFirst As Slide
    Dim shpHeart As Shape
    Dim effNew As Effect
    Dim bhvEffect As AnimationBehavior

    Set sldFirst = ActivePresentation.Slides(1)
    Set shpHeart = sldFirst.Shapes.AddShape(Type:=msoShapeHeart, _
        Left:=100, Top:=100, Width:=100, Height:=100)

    Set effNew = sldFirst.TimeLine.MainSequence.AddEffect _
        (Shape:=shpHeart, EffectID:=msoAnimEffectChangeFillColor, _
        Trigger:=msoAnimTriggerAfterPrevious)

    Set bhvEffect = effNew.Behaviors.Add(msoAnimTypeSet)

    With bhvEffect.SetEffect
         .Property = msoAnimShapeFillColor
        .To = RGB(Red:=0, Green:=255, Blue:=255)
    End With

End Sub

另请参阅See also

概念Concepts

AnimationBehavior 对象AnimationBehavior Object

© 2018 Microsoft