Share via


_Slide.MoveTo Method

Moves the specified object to a specific location within the same collection, renumbering all other items in the collection appropriately.

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

Syntax

'Declaration
Sub MoveTo ( _
    toPos As Integer _
)
'Usage
Dim instance As _Slide
Dim toPos As Integer

instance.MoveTo(toPos)
void MoveTo(
    int toPos
)

Parameters

  • toPos
    Type: System.Int32
    The index position to which to move the animation effect.

Examples

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.MoveTotoPos:=2



End Sub

This example moves the second slide in the active presentation to the first slide.

Sub MoveSlideToNewLocation()

    ActivePresentation.Slides(2).MoveTotoPos:=1

End Sub

See Also

Reference

_Slide Interface

_Slide Members

Microsoft.Office.Interop.PowerPoint Namespace