Direction Property

Microsoft PowerPoint Visual Basic

that represents the direction used for an animation effect. This property can be used only if the effect uses a direction. Read/write.

MsoAnimDirection can be one of these MsoAnimDirection constants.
msoAnimDirectionAcross
msoAnimDirectionBottom
msoAnimDirectionBottomLeft
msoAnimDirectionBottomRight
msoAnimDirectionCenter
msoAnimDirectionClockwise
msoAnimDirectionCounterclockwise
msoAnimDirectionCycleClockwise
msoAnimDirectionCycleCounterclockwise
msoAnimDirectionDown
msoAnimDirectionDownLeft
msoAnimDirectionDownRight
msoAnimDirectionFontAllCaps
msoAnimDirectionFontBold
msoAnimDirectionFontItalic
msoAnimDirectionFontShadow
msoAnimDirectionFontStrikethrough
msoAnimDirectionFontUnderline
msoAnimDirectionGradual
msoAnimDirectionHorizontal
msoAnimDirectionHorizontalIn
msoAnimDirectionHorizontalOut
msoAnimDirectionIn
msoAnimDirectionInBottom
msoAnimDirectionInCenter
msoAnimDirectionInSlightly
msoAnimDirectionInstant
msoAnimDirectionLeft
msoAnimDirectionNone
msoAnimDirectionOrdinalMask
msoAnimDirectionOut
msoAnimDirectionOutBottom
msoAnimDirectionOutCenter
msoAnimDirectionOutSlightly
msoAnimDirectionRight
msoAnimDirectionSlightly
msoAnimDirectionTop
msoAnimDirectionTopLeft
msoAnimDirectionTopRight
msoAnimDirectionUp
msoAnimDirectionUpLeft
msoAnimDirectionUpRight
msoAnimDirectionVertical
msoAnimDirectionVerticalIn
msoAnimDirectionVerticalOut

expression.Direction

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

Example

The following example adds a shape, and animates the shape to fly in from the left.

Sub AddShapeSetAnimFly()

    Dim effFly As Effect
    Dim shpCube As Shape

    Set shpCube = ActivePresentation.Slides(1).Shapes _
        .AddShape(Type:=msoShapeCube, Left:=100, _
        Top:=100, Width:=50, Height:=50)
    Set effFly = ActivePresentation.Slides(1).TimeLine.MainSequence _
        .AddEffect(Shape:=shpCube, effectId:=msoAnimEffectFly)

    effFly.Timing.Duration = 3
    effFly.EffectParameters.Direction = msoAnimDirectionLeft

End Sub