ScaleEffect Interface

Represents a scaling effect for an AnimationBehavior object.

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

Syntax

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

Examples

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

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

Use the ByX , ByY , FromX , FromY , ToX , and ToY properties of the ScaleEffect object to manipulate an object's scale. This example scales the first shape on the first slide starting at zero increasing in size until it reaches 100 percent of its original size. This example assumes that there is a shape on the first slide.

Sub ChangeScale()



    Dim shpFirst As Shape

    Dim effNew As Effect

    Dim aniScale As AnimationBehavior



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

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

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

    Set aniScale = effNew.Behaviors.Add(msoAnimTypeScale)



    With aniScale.ScaleEffect



        'Starting size

        .FromX = 0

        .FromY = 0



        'Size after scale effect

        .ToX = 100

        .ToY = 100

    End With



End Sub

See Also

Reference

ScaleEffect Members

Microsoft.Office.Interop.PowerPoint Namespace