Table of contents
TOC
折叠目录
展开目录

Effect.MoveTo 方法 (PowerPoint)Effect.MoveTo Method (PowerPoint)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

将指定对象移动到同一集合中的指定位置,并适当地对集合中所有其他项目进行重新编号。Moves the specified object to a specific location within the same collection, renumbering all other items in the collection appropriately.

语法Syntax

表达式MoveTo( toPos )expression. MoveTo( toPos )

表达式_一个表示Effect对象的变量。_expression A variable that represents an Effect object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
toPostoPos必需RequiredLongLong动画效果要移动到的索引位置。The index position to which to move the animation effect.

示例Example

本示例在指定形状的动画效果集合中将一个动画效果移动到第二个动画效果的位置上。This example moves an animation effect to the second in the animation effects collection for the specified shape.

Sub MoveEffect()

    Dim sldFirst as Slide
    Dim shpFirst As Shape
    Dim effAdd As Effect

    Set sldFirst = ActivePresentation.Slides(1)
    Set shpFirst = sldFirst.Shapes(1)
    Set effAdd = sldFirst.TimeLine.MainSequence.AddEffect _
        (Shape:=shpFirst, effectId:=msoAnimEffectBlinds)

    effAdd.MoveTo toPos:=2

End Sub

本示例将当前演示文稿中的第二张幻灯片移动到第一张幻灯片的位置上。This example moves the second slide in the active presentation to the first slide.

Sub MoveSlideToNewLocation()
    ActivePresentation.Slides(2).MoveTo toPos:=1
End Sub

另请参阅See also

概念Concepts

影响对象Effect Object

© 2018 Microsoft