Class ScaleEffect (PowerPoint VBA)

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


Dim set as ScaleEffect
Set set = ActivePresentation.SlideMaster.TimeLine.MainSequence(1).Behaviors(1).ScaleEffect

ByX

Sets or returns a Single that represents scaling or moving an object horizontally by a specified percentage of the screen width, depending on whether it used in conjunction with a ScaleEffect or MotionEffect object, respectively. For example, a value of 50 for a motion effect means to move the object half the screen width to the right.

Negative numbers move the object horizontally to the left. Floating point numbers (for example, 55.5) are allowed. To scale or move an object vertically, use the ByY property. If both the ByX and ByY properties are set, then the object is scaled or moves both horizontally and vertically. Do not confuse this property with the By property of the ColorEffect, RotationEffect, or PropertyEffect objects, which is used to set colors, rotations, or other properties of an animation behavior, respectively.


ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).Behaviors(1).ScaleEffect.ByX = 50

ByY

Sets or returns a Single that represents scaling or moving an object vertically by a specified percentage of the screen width, depending on whether it is used in conjunction with a ScaleEffect or MotionEffect object, respectively.

Negative numbers move the object horizontally to the left. Floating point numbers (for example, 55.5) are allowed. To scale or move an object horizontally, use the ByX property. If both the ByX and ByY properties are set, then the object is scaled or moves both horizontally and vertically. Do not confuse this property with the By property of the ColorEffect, RotationEffect, or PropertyEffect objects, which is used to set colors, rotations, or other properties of an animation behavior, respectively.


ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).Behaviors(1).ScaleEffect.ByY = 50

FromX

Sets or returns a Single that represents the starting width or horizontal position of a ScaleEffect object, specified as a percent of the screen width.

The default value of this property is Empty, in which case the current position of the object is used. Use this property in conjunction with the ToX property to resize or jump from one position to another. Do not confuse this property with the From property of the ColorEffect, RotationEffect, or PropertyEffect objects, which is used to set or change colors, rotations, or other properties of an animation behavior, respectively.


ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).Behaviors(1).ScaleEffect.FromX = 0

FromY

Returns or sets a Single that represents the starting height of a ScaleEffect object, specified as a percentage of the screen width.

The default value of this property is Empty, in which case the current position of the object is used. Use this property in conjunction with the ToY property to resize or jump from one position to another. Do not confuse this property with the From property of the ColorEffect, RotationEffect, or PropertyEffect objects, which is used to set or change colors, rotations, or other properties of an animation behavior, respectively.


ActivePresentation.SlideMaster.TimeLine.MainSequence(1).Behaviors(1).ScaleEffect.FromY =

ToX

Sets or returns a Single that represents the ending width of a ScaleEffect object, specified as a percent of the screen width.

The default value of this property is Empty, in which case the current position of the object is used. Use this property in conjunction with the FromX property to resize or jump from one position to another. Do not confuse this property with the To property of the ColorEffect, RotationEffect, or PropertyEffect objects, which is used to set or change colors, rotations, or other properties of an animation behavior, respectively.


ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).Behaviors(1).ScaleEffect.ToX = 50

ToY

Returns or sets a Single that represents the ending height of a ScaleEffect object, specified as a percentage of the screen width.

The default value of this property is Empty, in which case the current position of the object is used. Use this property in conjunction with the FromY property to resize or jump from one position to another. Do not confuse this property with the To property of the ColorEffect, RotationEffect, or PropertyEffect objects, which is used to set or change colors, rotations, or other properties of an animation behavior, respectively.


ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).Behaviors(1).ScaleEffect.ToY = 50