Share via


SlideRange.Duplicate Method

PowerPoint Developer Reference

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.

Visual Basic for Applications
  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