_Slide.Duplicate Method
Creates a duplicate of the specified Slide object, adds the new slide to the Slides collection immediately after the slide specified originally, and then returns a Slide object that represents the duplicate slide.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
Function Duplicate As SlideRange
'Usage
Dim instance As _Slide
Dim returnValue As SlideRange
returnValue = instance.Duplicate()
SlideRange Duplicate()
Return Value
Type: Microsoft.Office.Interop.PowerPoint.SlideRange
SlideRange
Examples
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).DuplicateWith newSlide
.Background.Fill.PresetGradient msoGradientVertical, _
1, msoGradientGold
.Shapes.Title.TextFrame.TextRange _
.Text = "Second Quarter Earnings"
End With