Class RotationEffect (PowerPoint VBA)

The class RotationEffect represents a rotation effect for an AnimationBehavior object. To use a RotationEffect class variable it first needs to be instantiated, for example


Dim ret as RotationEffect
Set ret = ActivePresentation.SlideMaster.TimeLine.MainSequence(1).Behaviors(1).RotationEffect

By

Sets or returns a Single that represents the rotation of an object by the specified number of degrees; for example, a value of 180 means to rotate the object by 180 degrees.

The specified object will be rotated with the center of the object remaining in the same position on the screen. If both the By and To properties are set for a rotation effect, then the value of the By property is ignored. Floating point numbers (for example, 55.5) are valid, but negative numbers are not. Do not confuse this property with the ByX or ByY properties of the ScaleEffect and MotionEffect objects, which are only used for scaling or motion effects.


ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).Behaviors(1).RotationEffect.By = 270

From

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

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.


ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).Behaviors(1).RotationEffect.From = 90

To

Sets or returns a Single that represents the ending rotation of an object in degrees, specified relative to the screen (for example, 90 degrees is completely horizontal).

Use this property in conjunction with the From 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 ToX or ToY properties of the ScaleEffect and MotionEffect objects, which are only used for scaling or motion effects.


ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).Behaviors(1).RotationEffect.To = 270