Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

Automate PowerPoint Presentations

Edit on GitHub

Compose, inspect, update, theme, import, and render repeatable presentation decks. Includes PowerShell examples, validation notes, and cmdlet links.

The PowerPoint family exports 53 commands for slide creation and editing, sections, shapes, images, text, charts, tables, notes, themes, layouts, transitions, import, inspection, designer decks, and semantic deck plans.

Use a presentation object in normal scripts

Create without a content block, add slides through an explicit presentation target, then save and close once. This keeps loops and conditional slide generation ordinary PowerShell:

$presentation = New-OfficePowerPoint -Path '.\Briefing.pptx'
$slide = Add-OfficePowerPointSlide -Document $presentation -TemplateLayout 2 -PassThru
Set-OfficePowerPointSlide -Slide $slide -Title 'Actions'
Add-OfficePowerPointTextBox -Slide $slide -Text 'Confirm the production date.' -X 90 -Y 170 -Width 700 -Height 60
$presentation | Save-OfficePowerPoint
$presentation | Close-OfficePowerPoint

Choose direct authoring or a deck plan

Direct authoring with New-OfficePowerPoint and Add-OfficePowerPointSlide is appropriate when the script owns exact slide composition. Add text boxes, shapes, tables, images, bullets, charts, notes, sections, and transitions inside the presentation context.

Use PowerPointSlide -Layout when content is semantic and the designer should choose layout. Sections, processes, capabilities, case studies, coverage views, card grids, and logo walls can be described in the slide content block.

Copy complete DSL recipes

  • Quarterly business review: title slide, performance chart, priorities table, bullets, and speaker notes.
  • Training workshop: learning objectives, agenda, call-to-action layout, and presenter notes.
  • Service brief: semantic designer slides combined with direct chart and table slides, sections, transitions, and inspection.

Other PowerPoint workflows

The DSL cookbook explains when to use direct placement and when to use a semantic deck plan.

Task guides

Inspect and update an existing deck

Inspection commands expose slides, sections, shapes, placeholders, layouts, notes, themes, and slide summaries. Bounded setters update titles, shape text, table cells, slide size and layout, placeholder bounds and text styles, notes, transitions, backgrounds, and theme identity.

Copy or import slides when the workflow assembles a deck from approved sources. Keep theme and layout changes separate from content changes so validation can distinguish a brand update from a data update.

Review output

Use Convert-OfficeDocument -Path ./review.pptx -To Html -OutputPath ./review.html for a browser-review surface and Export-OfficeDocumentImage -Path ./review.pptx -OutputDirectory ./slides for slide images. For exact parameters and supported chart/layout values, search the command reference for OfficePowerPoint. The PowerPoint examples demonstrate normal script shapes.

API used on this page

Example source