Table of contents
Collapse the table of content
Expand the table of content

RotationEffect.From Property (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Sets or returns a Single that represents the starting angle in degrees, specified relative to the screen (for example, 90 degrees is completely horizontal). Read/write.


expression. From

expression A variable that represents a RotationEffect object.


Use this property in conjunction with the To property to transition from one rotation angle to another.

The default value is Empty in which case the current position of the object is used.

Do not confuse this property with the FromX or FromY properties of the ScaleEffect and MotionEffect objects, which are only used for scaling or motion effects.


The following example adds a rotation effect and immediately changes its rotation angle.

Sub AddAndChangeRotationEffect()

    Dim effBlinds As Effect
    Dim tlnTiming As TimeLine
    Dim shpRectangle As Shape
    Dim animRotation As AnimationBehavior
    Dim rtnEffect As RotationEffect

    'Adds rectangle and sets effect and animation
    Set shpRectangle = ActivePresentation.Slides(1).Shapes_
        .AddShape(Type:=msoShapeRectangle, Left:=100, _
        Top:=100, Width:=50, Height:=50)

    Set tlnTiming = ActivePresentation.Slides(1).TimeLine

    Set effBlinds = tlnTiming.MainSequence.AddEffect(Shape:=shpRectangle, _

    Set animRotation = tlnTiming.MainSequence(1).Behaviors _

    Set rtnEffect = animRotation.RotationEffect

    'Sets the rotation effect starting and ending positions
    rtnEffect.From = 90
    rtnEffect.To = 270

End Sub

See also


RotationEffect Object

© 2018 Microsoft