Cmdlet
Copy-OfficePowerPointSlide
Copies an existing slide within a PowerPoint presentation.
Syntax
Copy-OfficePowerPointSlide
-Index <Int32>
[-InsertAt <Int32>]
[-PassThru]
[-Presentation <PowerPointPresentation>]
[<CommonParameters>]#Parameter set:
All Parameter SetsDescription
Uses OfficeIMO slide duplication so charts, notes, and shapes are preserved.
Examples
Duplicate the first slide and insert the copy after it.
New-OfficePowerPoint -Path .\Examples\Documents\PowerPointCopySlide.pptx {
$slide = Add-OfficePowerPointSlide -Layout 1 -PassThru
Set-OfficePowerPointSlideTitle -Slide $slide -Title 'Original'
$copy = Copy-OfficePowerPointSlide -Index 0 -PassThru
Set-OfficePowerPointSlideTitle -Slide $copy -Title 'Copied appendix'
}Duplicates a slide and updates the copied slide title.
Parameters
- -Index Int32
- Zero-based slide index to duplicate.
- -InsertAt Int32
- Optional target index for the duplicate; omit to insert after the source slide.
- -PassThru SwitchParameter
- Emit the object created or changed by the command.
- -Presentation PowerPointPresentation
- Presentation to update (optional inside DSL).
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.