AnimationBehavior.MotionEffect property (PowerPoint)

Returns a MotionEffect object that represents the properties of a motion animation.

Syntax

expression. MotionEffect

expression A variable that represents an AnimationBehavior object.

Return value

MotionEffect

Example

This example adds a new motion behavior to the first slide's main sequence that moves the specified animation sequence from one side of the page to the shape's original position.

Sub NewMotion()

    With ActivePresentation.Slides(1).TimeLine.MainSequence(1) _
            .Behaviors.Add(msoAnimTypeMotion).MotionEffect
        .FromX = 100
        .FromY = 100
        .ToX = 0
        .ToY = 0
    End With

End Sub

See also

AnimationBehavior Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.