Share via


RotationEffect.To Property

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). Read/write.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
Property To As Single
    Get
    Set
'Usage
Dim instance As RotationEffect
Dim value As Single

value = instance.To

instance.To = value
float To { get; set; }

Property Value

Type: System.Single
Single

Remarks

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 [F:Microsoft.Office.Interop.PowerPoint.RotationEffect.To.ppproToX_HV03082378.htm#ToX#SameCHM] or [F:Microsoft.Office.Interop.PowerPoint.RotationEffect.To.ppproToY_HV03082379.htm#ToY#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 from 90 degrees to 270 degrees.

Sub AddAndChangeRotationEffect()

    Dim effBlinds As Effect

    Dim tmlTiming As TimeLine

    Dim shpRectangle As Shape

    Dim animColor As AnimationBehavior

    Dim rtnEffect As RotationEffect



    Set shpRectangle = ActivePresentation.Slides(1).Shapes(1)

    Set tmlTiming = ActivePresentation.Slides(1).TimeLine

    Set effBlinds = tmlTiming.MainSequence.AddEffect(Shape:=shpRectangle, _

        effectId:=msoAnimEffectBlinds)

    Set animColor = tmlTiming.MainSequence(1).Behaviors.Add(Type:=msoAnimTypeRotation)

    Set rtnEffect = animColor.RotationEffect



    rtnEffect.From = 90

    rtnEffect.To= 270

End Sub

See Also

Reference

RotationEffect Interface

RotationEffect Members

Microsoft.Office.Interop.PowerPoint Namespace