Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Import-OfficePowerPointSlide

Module
PSWriteOffice
Inputs
OfficeIMO.PowerPoint.PowerPointDocument System.String
Outputs
OfficeIMO.PowerPoint.PowerPointSlide

Imports selected slides from a file or live document, preserving native relationships.

Syntax

Import-OfficePowerPointSlide
[-Document <PowerPointDocument>]
[-PassThru]
[-Path] <String>
[-Position <Int32>]
[-SourceSlide <Int32[]>]
[<CommonParameters>]
#
Parameter set: Path
Import-OfficePowerPointSlide
[-Document <PowerPointDocument>]
-LiteralPath <String>
[-PassThru]
[-Position <Int32>]
[-SourceSlide <Int32[]>]
[<CommonParameters>]
#
Parameter set: LiteralPath
Import-OfficePowerPointSlide
[-Document <PowerPointDocument>]
[-PassThru]
[-Position <Int32>]
-SourceDocument <PowerPointDocument>
[-SourceSlide <Int32[]>]
[<CommonParameters>]
#
Parameter set: SourceDocument

Description

SourceSlide and Position are one-based. Omit SourceSlide to import every slide in order; omit Position to append. The target remains open until explicitly saved and closed.

Examples

Import selected slides from a live library.

Import-OfficePowerPointSlide -Document $deck -SourceDocument $library -SourceSlide 3, 4 -Position 2 -PassThru

Append a file whose name contains brackets.

Get-Item -LiteralPath './Appendix[final].pptx' | Import-OfficePowerPointSlide -Document $deck

Parameters

-Document PowerPointDocument optionalpipeline: True (ByValue)
Gets or sets the live target; omission uses the current presentation block.
-PassThru SwitchParameter optional
Gets or sets whether to return the live imported slides in selection order.
-Path String requiredposition: 0sets: Path
Gets or sets the source file path with FileSystem wildcard expansion.
-Position Int32 optional
Gets or sets the one-based insertion position; omission appends.
-SourceSlide Int32[] optional
Gets or sets one-based source positions in selection order; omission imports every slide.
-LiteralPath String requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath
Gets or sets a source file without wildcard expansion, including FileInfo.FullName.
-SourceDocument PowerPointDocument requiredsets: SourceDocument
Gets or sets the live source, which remains open after import.

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.