OfficeIMO

API Reference

Command

New-OfficePowerPoint

Namespace PSWriteOffice
Inputs
None
Outputs
System.Object

Creates a PowerPoint presentation using the DSL.

Remarks

Creates a PowerPoint presentation using the DSL.

Examples

Create and capture the presentation object.


PS>$ppt = New-OfficePowerPoint -FilePath .\deck.pptx
        

Creates deck.pptx and returns the live presentation object for further editing.

Create a deck with a title slide.


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

Creates, saves, and opens a deck with one titled slide.

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

New-OfficePowerPoint [-Content <ScriptBlock>] -FilePath <String> [-NoSave] [-Open] [-PassThru] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Content ScriptBlock optionalposition: 1pipeline: False
DSL scriptblock describing presentation content.
FilePath String requiredposition: 0pipeline: Falsealiases: Path
Destination path for the new .pptx.
NoSave SwitchParameter optionalposition: namedpipeline: False
Skip saving after executing the DSL.
Open SwitchParameter optionalposition: namedpipeline: False
Open the presentation after saving.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit a FileInfo for chaining.

Outputs

System.Object