返回介绍

AddEffect 方法

发布于 2019-10-04 14:06:54 字数 10634 浏览 1148 评论 0 收藏 0

全部显示

返回一个Effect 对象,该对象代表一个已添加到动画效果序列中的新动画效果。

expression.AddEffect(Shape, effectId, Level, trigger, Index)

expression必选。该表达式返回“应用于”列表中的对象之一。

Shape必选。Shape 对象。添加动画效果的形状。

effectId必选。MsoAnimEffect 类型。要应用的动画效果。

MsoAnimEffect 可以是下列 MsoAnimEffect 类型常数之一。
msoAnimEffectAppear
msoAnimEffectArcUp
msoAnimEffectAscend
msoAnimEffectBlast
msoAnimEffectBlinds
msoAnimEffectBoldFlash
msoAnimEffectBoldReveal
msoAnimEffectBoomerang
msoAnimEffectBounce
msoAnimEffectBox
msoAnimEffectBrushOnColor
msoAnimEffectBrushOnUnderline
msoAnimEffectCenterRevolve
msoAnimEffectChangeFillColor
msoAnimEffectChangeFont
msoAnimEffectChangeFontColor
msoAnimEffectChangeFontSize
msoAnimEffectChangeFontStyle
msoAnimEffectChangeLineColor
msoAnimEffectCheckerboard
msoAnimEffectCircle
msoAnimEffectColorBlend
msoAnimEffectColorReveal
msoAnimEffectColorWave
msoAnimEffectComplementaryColor
msoAnimEffectComplementaryColor2
msoAnimEffectContrastingColor
msoAnimEffectCrawl
msoAnimEffectCredits
msoAnimEffectCustom
msoAnimEffectDarken
msoAnimEffectDesaturate
msoAnimEffectDescend
msoAnimEffectDiamond
msoAnimEffectDissolve
msoAnimEffectEaseIn
msoAnimEffectExpand
msoAnimEffectFade
msoAnimEffectFadedAscend
msoAnimEffectFadedSwivel
msoAnimEffectFadedZoom
msoAnimEffectFlashBulb
msoAnimEffectFlashOnce
msoAnimEffectFlicker
msoAnimEffectFlip
msoAnimEffectFloat
msoAnimEffectFly
msoAnimEffectFold
msoAnimEffectGlide
msoAnimEffectGrowAndTurn
msoAnimEffectGrowShrink
msoAnimEffectGrowWithColor
msoAnimEffectLighten
msoAnimEffectLightSpeed
msoAnimEffectMediaPause
msoAnimEffectMediaPlay
msoAnimEffectMediaStop
msoAnimEffectPath4PointStar
msoAnimEffectPath5PointStar
msoAnimEffectPath6PointStar
msoAnimEffectPath8PointStar
msoAnimEffectPathArcDown
msoAnimEffectPathArcLeft
msoAnimEffectPathArcRight
msoAnimEffectPathArcUp
msoAnimEffectPathBean
msoAnimEffectPathBounceLeft
msoAnimEffectPathBounceRight
msoAnimEffectPathBuzzsaw
msoAnimEffectPathCircle
msoAnimEffectPathCrescentMoon
msoAnimEffectPathCurvedSquare
msoAnimEffectPathCurvedX
msoAnimEffectPathCurvyLeft
msoAnimEffectPathCurvyRight
msoAnimEffectPathCurvyStar
msoAnimEffectPathDecayingWave
msoAnimEffectPathDiagonalDownRight
msoAnimEffectPathDiagonalUpRight
msoAnimEffectPathDiamond
msoAnimEffectPathDown
msoAnimEffectPathEqualTriangle
msoAnimEffectPathFigure8Four
msoAnimEffectPathFootball
msoAnimEffectPathFunnel
msoAnimEffectPathHeart
msoAnimEffectPathHeartbeat
msoAnimEffectPathHexagon
msoAnimEffectPathHorizontalFigure8
msoAnimEffectPathInvertedSquare
msoAnimEffectPathInvertedTriangle
msoAnimEffectPathLeft
msoAnimEffectPathLoopdeLoop
msoAnimEffectPathNeutron
msoAnimEffectPathOctagon
msoAnimEffectPathParallelogram
msoAnimEffectPathPeanut
msoAnimEffectPathPentagon
msoAnimEffectPathPlus
msoAnimEffectPathPointyStar
msoAnimEffectPathRightTriangle
msoAnimEffectPathSCurve1
msoAnimEffectPathSCurve2
msoAnimEffectPathSineWave
msoAnimEffectPathSpiralLeft
msoAnimEffectPathSpiralRight
msoAnimEffectPathSpring
msoAnimEffectPathSquare
msoAnimEffectPathStairsDown
msoAnimEffectPathSwoosh
msoAnimEffectPathTeardrop
msoAnimEffectPathTrapezoid
msoAnimEffectPathTurnDown
msoAnimEffectPathTurnRight
msoAnimEffectPathTurnUp
msoAnimEffectPathTurnUpRight
msoAnimEffectPathVerticalFigure8
msoAnimEffectPathWave
msoAnimEffectPathZigzag
msoAnimEffectPeek
msoAnimEffectPinwheel
msoAnimEffectPlus
msoAnimEffectRandomBars
msoAnimEffectRandomEffects
msoAnimEffectRiseUp
msoAnimEffectShimmer
msoAnimEffectSling
msoAnimEffectSpin
msoAnimEffectSpinner
msoAnimEffectSpiral
msoAnimEffectSplit
msoAnimEffectStretch
msoAnimEffectStretchy
msoAnimEffectStrips
msoAnimEffectStyleEmphasis
msoAnimEffectSwish
msoAnimEffectSwivel
msoAnimEffectTeeter
msoAnimEffectThinLine
msoAnimEffectTransparency
msoAnimEffectUnfold
msoAnimEffectVerticalGrow
msoAnimEffectWave
msoAnimEffectWedge
msoAnimEffectWheel
msoAnimEffectWhip
msoAnimEffectWipe
msoAnimEffectZip
msoAnimEffectZoom

Level可选。MsoAnimateByLevel 类型。对图表、图示或文本,将应用相应的动画效果级别。默认值为 msoAnimationLevelNone。

MsoAnimateByLevel 可以是下列 MsoAnimateByLevel 类型常数之一。
msoAnimateChartAllAtOnce
msoAnimateChartByCategory
msoAnimateChartByCategoryElements
msoAnimateChartBySeries
msoAnimateChartBySeriesElements
msoAnimateDiagramAllAtOnce
msoAnimateDiagramBreadthByLevel
msoAnimateDiagramBreadthByNode
msoAnimateDiagramClockwise
msoAnimateDiagramClockwiseIn
msoAnimateDiagramClockwiseOut
msoAnimateDiagramCounterClockwise
msoAnimateDiagramCounterClockwiseIn
msoAnimateDiagramCounterClockwiseOut
msoAnimateDiagramDepthByBranch
msoAnimateDiagramDepthByNode
msoAnimateDiagramDown
msoAnimateDiagramInByRing
msoAnimateDiagramOutByRing
msoAnimateDiagramUp
msoAnimateLevelMixed
msoAnimateTextByAllLevels
msoAnimateTextByFifthLevel
msoAnimateTextByFirstLevel
msoAnimateTextByFourthLevel
msoAnimateTextBySecondLevel
msoAnimateTextByThirdLevel
msoAnimationLevelNone

trigger可选。MsoAnimTriggerType 类型。触发动画效果的动作。默认值为 msoAnimTriggerOnPageClick

MsoAnimTriggerType 可以是下列 MsoAnimTriggerType 常数之一。
msoAnimTriggerAfterPrevious
msoAnimTriggerMixed
msoAnimTriggerNone
msoAnimTriggerOnPageClick
msoAnimTriggerOnShapeClick
msoAnimTriggerWithPrevious
Index可选。Long 类型。效果在动画效果集合中放置的位置。默认值为 -1(添加到末尾)。

示例

以下示例将一个弹跳的动画添加到第一张幻灯片的第一个形状范围内。本示例假定形状范围包含在第一张幻灯片中选定的一个或多个形状。

Sub AddBouncingAnimation()

    Dim sldActive As Slide
    Dim shpSelected As Shape

    Set sldActive = ActiveWindow.Selection.SlideRange(1)
    Set shpSelected = ActiveWindow.Selection.ShapeRange(1)

    ' Add a bouncing animation.
    sldActive.TimeLine.MainSequence.AddEffect _
        Shape:=shpSelected, effectId:=msoAnimEffectBounce

End Sub

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文