Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Open-OfficePowerPoint

Module
PSWriteOffice
Inputs
System.String
Outputs
OfficeIMO.PowerPoint.PowerPointDocument System.IO.FileInfo

Opens a presentation for explicit editing, or atomically saves a completed content block.

Syntax

Open-OfficePowerPoint
[-AllowLoss]
[[-Content] <ScriptBlock>]
[-PassThru]
[-Password <SecureString>]
[-Path] <String>
[-Show]
[<CommonParameters>]
#
Parameter set: Path
Open-OfficePowerPoint
[-AllowLoss]
[[-Content] <ScriptBlock>]
-LiteralPath <String>
[-PassThru]
[-Password <SecureString>]
[-Show]
[<CommonParameters>]
#
Parameter set: LiteralPath

Description

Opening preserves the document's theme and encryption. Without a block, the returned document stays open until Close-OfficePowerPoint. A failed block leaves the source unchanged.

Examples

Open a deck without interpreting brackets as wildcards.

$deck = Open-OfficePowerPoint -LiteralPath './Review[final].pptx'
Save-OfficePowerPoint -Document $deck -Path ./Review.pptx
Close-OfficePowerPoint -Document $deck

Parameters

-AllowLoss SwitchParameter optional
Gets or sets whether native-save loss is explicitly accepted.
-Content ScriptBlock optionalposition: 1
Gets or sets a content block; omission returns the live document.
-PassThru SwitchParameter optional
Gets or sets whether a completed content block returns the saved FileInfo.
-Password SecureString optional
Source password as a SecureString, credential, or warned plaintext value.
-Path String requiredposition: 0pipeline: True (ByValue)sets: Path
Presentation paths with FileSystem wildcard expansion.
-Show SwitchParameter optional
Gets or sets whether the saved file opens in the system default application.
-LiteralPath String requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath
Presentation path without wildcard expansion; accepts FileInfo.FullName and provider PSPath.

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.