AnimationSettings.DimColor 属性 (PowerPoint)

返回或设置一个 ColorFormat 对象,该对象代表指定形状生成后的颜色。 只读。

语法

expressionDimColor

表达 一个代表 AnimationSettings 对象的变量。

返回值

ColorFormat

备注

如果您没有获得预期的效果,请检查其他生成设置。 除非 AnimationSettings 对象的 TextLevelEffect 属性设置为 ppAnimateLevelNoneAfterEffect 属性设置为 ppAfterEffectDim动画 属性设置为 True ,您不会看到 DimColor 属性的效果。 此外,如果指定的形状是唯一的项目或要生成在幻灯片上的最后一项,该形状无法变暗。 若要更改生成顺序的一张幻灯片上的形状,请使用 AnimationOrder 属性。

示例

本示例在当前演示文稿中添加一张幻灯片。该幻灯片包含一个标题和一个三项目的列表。本示例设置标题和列表在创建后变暗,并设置它们变暗的颜色。

With ActivePresentation.Slides.Add(2, ppLayoutText).Shapes
    With .Item(1)
        .TextFrame.TextRange.Text = "Sample title"
        With .AnimationSettings
            .TextLevelEffect = ppAnimateByAllLevels
            .AfterEffect = ppAfterEffectDim
            .DimColor.SchemeColor = ppShadow
            .Animate = True
        End With
    End With

    With .Item(2)
        .TextFrame.TextRange.Text = "Item one" _
            & Chr(13) & "Item two"
        With .AnimationSettings
            .TextLevelEffect = ppAnimateByFirstLevel
            .AfterEffect = ppAfterEffectDim
            .DimColor.RGB = RGB(100, 150, 130)
            .Animate = True
        End With
    End With
End With

另请参阅

AnimationSettings 对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。