Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Get-OfficePowerPointTheme

Module
PSWriteOffice
Inputs
OfficeIMO.PowerPoint.PowerPointDocument
Outputs
PSWriteOffice.Services.PowerPoint.PowerPointThemeInfo

Reads the selected slide master's theme, colors and fonts.

Syntax

Get-OfficePowerPointTheme
[[-Document] <PowerPointDocument>]
[-Master <Int32>]
[<CommonParameters>]
#
Parameter set: Document

Examples

Inspect the first master's theme.

$deck = Open-OfficePowerPoint -Path ./Review.pptx
Get-OfficePowerPointTheme -Document $deck -Master 1
Close-OfficePowerPoint -Document $deck

Inspect the theme while composing a deck.

New-OfficePowerPoint -Path ./Review.pptx -Theme Modern {
    $theme = Get-OfficePowerPointTheme
    PowerPointSlide -Title 'Service review'
}

Parameters

-Document PowerPointDocument optionalposition: 0pipeline: True (ByValue)
Gets or sets the live document; omission uses its enclosing content block.
-Master Int32 optional
Gets or sets a one-based master position; defaults to the first.

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.

Outputs

PSWriteOffice.Services.PowerPoint.PowerPointThemeInfo: Describes a PowerPoint theme for a single slide master.