Share via


AnimationSettings.AnimateBackground Property

If the specified object is an AutoShape, specifies if the shape is animated separately from the text it contains. Read/write.

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

Syntax

'Declaration
Property AnimateBackground As MsoTriState
    Get
    Set
'Usage
Dim instance As AnimationSettings
Dim value As MsoTriState

value = instance.AnimateBackground

instance.AnimateBackground = value
MsoTriState AnimateBackground { get; set; }

Property Value

Type: Microsoft.Office.Core.MsoTriState

Remarks

Use the TextLevelEffect and [F:Microsoft.Office.Interop.PowerPoint.AnimationSettings.AnimateBackground.ppproTextUnitEffect1_HV05193919.htm#TextUnitEffect#SameCHM] properties to control the animation of text attached to the specified shape.

If the specified shape is a graph object, the property value is msoTrue if the background (the axes and gridlines) of the specified graph object is animated. The property applies only to AutoShapes with text that can be built in more than one step or to graph objects.

If this property is set to msoTrue and the TextLevelEffect property is set to ppAnimateByAllLevels, the shape and its text are animated simultaneously. If this property is set to msoTrue and the TextLevelEffect property is set to anything other than ppAnimateByAllLevels, the shape is animated immediately before the text is animated.

The effects of setting this property are not apparent unless the specified shape is animated. For a shape to be animated, the TextLevelEffect property for the shape must be set to something other than ppAnimateLevelNone, and either the AnimateAction property must be set to msoTrue, or the [F:Microsoft.Office.Interop.PowerPoint.AnimationSettings.AnimateBackground.ppproEntryEffect1_HV05192493.htm#EntryEffect#SameCHM] property must be set to a constant other than ppEffectNone.

The value of the AnimateBackground property can be one of these MsoTriState constants.

Constant

Description

msoFalse

The specified shape is not animated separately from the text it contains.

msoTrue

The specified shape is animated separately from the text it contains.

Examples

This example creates a rectangle that contains text. The example then specifies that the shape should fly in from the lower right, that the text should be built from first-level paragraphs, and that the shape should be animated separately from the text it contains. In this example, the EntryEffect property turns on animation.

Sub AnimateTextBox()

    With ActivePresentation.Slides(1).Shapes.AddShape _

            (Type:=msoShapeRectangle, Left:=50, Top:=200, _

            Width:=200, Height:=200)

        .TextFrame.TextRange = "Reason 1" & Chr(13) & _

        "Reason 2" & Chr(13) & "Reason 3"

        With .AnimationSettings

            .EntryEffect = ppEffectFlyFromBottomRight

            .TextLevelEffect = ppAnimateByFirstLevel

            .TextUnitEffect = ppAnimateByParagraph

            .AnimateBackground= msoTrue

        End With

    End With

End Sub

See Also

Reference

AnimationSettings Interface

AnimationSettings Members

Microsoft.Office.Interop.PowerPoint Namespace