MotionEffect Property

Microsoft PowerPoint Visual Basic

object that represents the properties of a motion animation.

expression.MotionEffect

expression    Required. An expression that returns one of the objects in the Applies To list.

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