RotationEffect.From Property
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.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
Property From As Single
Get
Set
'Usage
Dim instance As RotationEffect
Dim value As Single
value = instance.From
instance.From = value
float From { get; set; }
Property Value
Type: System.Single
Remarks
Use this property in conjunction with the [F:Microsoft.Office.Interop.PowerPoint.RotationEffect.From.ppproTo_HV03082370.htm#To#SameCHM] 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 [F:Microsoft.Office.Interop.PowerPoint.RotationEffect.From.ppproFromX_HV03082376.htm#FromX#SameCHM] or [F:Microsoft.Office.Interop.PowerPoint.RotationEffect.From.ppproFromY_HV03082377.htm#FromY#SameCHM] properties of the ScaleEffect and MotionEffect objects, which are only used for scaling or motion effects.
Examples
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