OfficeIMO

API Reference

Command

Add-OfficePowerPointSlide

Namespace PSWriteOffice
Inputs
OfficeIMO.PowerPoint.PowerPointPresentation
Outputs
System.Object

Adds a new slide to a PowerPoint presentation.

Remarks

Adds a new slide to a PowerPoint presentation.

Examples

Append a slide with the default layout.


PS>$ppt = New-OfficePowerPoint -FilePath .\deck.pptx; Add-OfficePowerPointSlide -Presentation $ppt
        

Creates a deck and appends a new slide at the end.

Create a slide using the DSL.


PS>New-OfficePowerPoint -Path .\deck.pptx { PptSlide { PptTitle -Title 'Status Update' } }
        

Creates a slide and sets the title using DSL aliases.

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.

Syntax

Add-OfficePowerPointSlide [-Content <ScriptBlock>] [-Layout <Int32>] [-Master <Int32>] [-Presentation <PowerPointPresentation>] [<CommonParameters>]
#
Parameter set: Index

Parameters

Content ScriptBlock optionalposition: 0pipeline: False
Nested DSL content executed within the slide scope.
Layout Int32 optionalposition: namedpipeline: False
Layout index to use (matches the template’s built-in layouts).
Master Int32 optionalposition: namedpipeline: False
Slide master index to use.
Presentation PowerPointPresentation optionalposition: namedpipeline: True (ByValue)
Presentation to update (optional inside New-OfficePowerPoint).

Outputs

System.Object

Add-OfficePowerPointSlide [-CaseSensitive] [-Content <ScriptBlock>] -LayoutName <String> [-Master <Int32>] [-Presentation <PowerPointPresentation>] [<CommonParameters>]
#
Parameter set: Name

Parameters

CaseSensitive SwitchParameter optionalposition: namedpipeline: False
Use case-sensitive matching for layout names.
Content ScriptBlock optionalposition: 0pipeline: False
Nested DSL content executed within the slide scope.
LayoutName String requiredposition: namedpipeline: False
Layout name to use (case-insensitive by default).
Master Int32 optionalposition: namedpipeline: False
Slide master index to use.
Presentation PowerPointPresentation optionalposition: namedpipeline: True (ByValue)
Presentation to update (optional inside New-OfficePowerPoint).

Outputs

System.Object

Add-OfficePowerPointSlide [-Content <ScriptBlock>] -LayoutType <SlideLayoutValues> [-Master <Int32>] [-Presentation <PowerPointPresentation>] [<CommonParameters>]
#
Parameter set: Type

Parameters

Content ScriptBlock optionalposition: 0pipeline: False
Nested DSL content executed within the slide scope.
LayoutType SlideLayoutValues requiredposition: namedpipeline: False
Layout type to use.
Master Int32 optionalposition: namedpipeline: False
Slide master index to use.
Presentation PowerPointPresentation optionalposition: namedpipeline: True (ByValue)
Presentation to update (optional inside New-OfficePowerPoint).

Outputs

System.Object