From Property
From property as it applies to the ColorEffect object.
Sets or returns a ColorFormat object that represents the starting RGB color value of an animation behavior.
expression.From
expression Required. An expression that returns a ColorEffect object.
Remarks
Use this property in conjunction with the To property to transition from one color to another.
From property as it applies to the RotationEffect object.
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 Required. An expression that returns 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.
From property as it applies to the PropertyEffect object.
Sets or returns a Variant that represents the starting value of an object’s property. Read/write.
expression.From
expression Required. An expression that returns a PropertyEffect object.
Remarks
The From property is similar to the Points property, but using the From property is easier for simple tasks.
The default value is Empty, in which case the current position of the object is used.
Remarks
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
As it applies to the ColorEffect object.
The following example adds a color effect and immediately changes its color.
Sub AddAndChangeColorEffect()
Dim effBlinds As Effect
Dim tlnTiming As TimeLine
Dim shpRectangle As Shape
Dim animColorEffect As AnimationBehavior
Dim clrEffect As ColorEffect
'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 effBlinds = t.MainSequence.AddEffect(Shape:=shpRectangle, _
effectId:=msoAnimEffectBlinds)
Set animColorEffect = tlnTimming.MainSequence(1).Behaviors _
.Add(Type:=msoAnimTypeColor)
Set clrEffect = animColorEffect.ColorEffect
'Sets the animation effect starting and ending colors
clrEffect.From.RGB = RGB(Red:=255, Green:=255, Blue:=0)
clrEffect.To.RGB = RGB(Red:=0, Green:=255, Blue:=255)
End Sub
As it applies to the RotationEffect object.
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