Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Close-OfficePowerPoint

Module
PSWriteOffice
Inputs
OfficeIMO.PowerPoint.PowerPointDocument

Closes a live presentation without saving it.

Syntax

Close-OfficePowerPoint
[-Document] <PowerPointDocument>
[<CommonParameters>]
#
Parameter set: Document

Description

Releases the native document and writes no output. Save changes explicitly with Save-OfficePowerPoint before closing. Documents configured for SaveOnDispose must be reopened with explicit persistence.

Examples

Save and close a deck.

$deck = Open-OfficePowerPoint -Path ./Review.pptx
Save-OfficePowerPoint -Document $deck
Close-OfficePowerPoint -Document $deck

Parameters

-Document PowerPointDocument requiredposition: 0pipeline: True (ByValue)
Live presentation to close.

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.