RotationEffect.From property (PowerPoint)
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.
Syntax
expression. From
expression A variable that represents a RotationEffect object.
Remarks
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.
Example
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, _
effectId:=msoAnimEffectBlinds)
Set animRotation = tlnTiming.MainSequence(1).Behaviors _
.Add(Type:=msoAnimTypeRotation)
Set rtnEffect = animRotation.RotationEffect
'Sets the rotation effect starting and ending positions
rtnEffect.From = 90
rtnEffect.To = 270
End Sub
See also
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.