RotationEffect Interface

Represents a rotation effect for an AnimationBehavior object.

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

Syntax

'Declaration
<GuidAttribute("914934E8-5A91-11CF-8700-00AA0060263B")> _
Public Interface RotationEffect
'Usage
Dim instance As RotationEffect
[GuidAttribute("914934E8-5A91-11CF-8700-00AA0060263B")]
public interface RotationEffect

Examples

Use the RotationEffect property of the AnimationBehavior object to return a RotationEffect object. The following example refers to the rotation effect for a given animation behavior.

ActivePresentation.Slides(1).TimeLine.MainSequence.Item.Behaviors(1).RotationEffect

Use the By , From , and To properties of the RotationEffect object to affect an object's animation rotation. The following example adds a new shape to the first slide and sets the rotation animation behavior.

Sub AddRotation()



    Dim shpNew As Shape

    Dim effNew As Effect

    Dim aniNew As AnimationBehavior



    Set shpNew = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShape5pointStar, Left:=0, _

        Top:=0, Width:=100, Height:=100)

    Set effNew = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpNew, effectId:=msoAnimEffectCustom)

    Set aniNew = effNew.Behaviors.Add(msoAnimTypeRotation)



    With aniNew.RotationEffect

        'Rotate 270 degrees from current position

        .By = 270

    End With



End Sub

See Also

Reference

RotationEffect Members

Microsoft.Office.Interop.PowerPoint Namespace