Partager via


SlideRange.Duplicate Method (PowerPoint)

Creates a duplicate of the specified SlideRange object, adds the new range of slides to the Slides collection immediately after the slide range specified originally, and then returns a SlideRange object that represents the duplicate slides.

Syntax

expression .Duplicate

expression A variable that represents a SlideRange object.

Return Value

SlideRange

Example

This example creates a duplicate of slide one in the active presentation and then sets the background shading and the title text of the new slide. The new slide will be slide two in the presentation.

Set newSlide = ActivePresentation.Slides(1).Duplicate

With newSlide

    .Background.Fill.PresetGradient msoGradientVertical, _

        1, msoGradientGold

    .Shapes.Title.TextFrame.TextRange _

        .Text = "Second Quarter Earnings"

End With

See Also

Concepts

SlideRange Object

SlideRange Object Members