Skip to content

ppt placeholder

goworm edited this page Jun 26, 2026 · 52 revisions

PowerPoint: Placeholder

Access and modify layout placeholders on a slide. Placeholders are auto-cloned from the slide layout if not already present.

Path: /slide[N]/placeholder[X] (X = index or type name)

Type names: title, body, subtitle, centertitle, date, footer, slidenum, picture, chart, table, object

Operations

Placeholders support the same set/get properties as shapes. See Shape-Set for property details.

add

Create a new placeholder shape on a slide. Geometry and fonts inherit from the matching layout placeholder (leaves <p:spPr> empty).

Parent: /slide[N]

Property Required Description
phType / type yes Placeholder type: title, body, subtitle, date, footer, slidenum, header, picture, chart, table, diagram, media, obj, clipart
text no Optional prepopulated text (omit to show the layout's prompt text)
name no Override the auto-generated shape name
officecli add slides.pptx /slide[1] --type placeholder --prop phType=title --prop text="Overview"
officecli add slides.pptx /slide[1] --type placeholder --prop phType=body
officecli add slides.pptx /slide[1] --type placeholder --prop phType=footer --prop text="Confidential"

get

officecli get slides.pptx "/slide[1]/placeholder[title]"
officecli get slides.pptx /slide[1]/placeholder[1]

Read-only attributes (get only):

Property Description
effective.size Resolved font size inherited from placeholder→layout→master→presentation defaults. Suppressed when size is set directly on the placeholder. Read back as unit-qualified pt (e.g. 18pt).
effective.font Resolved font name inherited from placeholder→layout→master→presentation defaults. Suppressed when font is set directly on the placeholder.
effective.color Resolved text color inherited from placeholder→layout→master→presentation defaults. Suppressed when color is set directly on the placeholder. Read back as #-prefixed uppercase hex (scheme colors pass through).
effective.bold Resolved bold inherited from placeholder→layout→master→presentation defaults. Suppressed when bold is set directly on the placeholder.
inheritedFrom Placeholder inheritance source — layout when the placeholder definition lives on the parent slide layout (not the slide itself).

set

officecli set slides.pptx "/slide[1]/placeholder[title]" --prop text="New Title" --prop font=Arial --prop size=36
officecli set slides.pptx "/slide[1]/placeholder[body]" --prop text="Key findings" --prop size=20
officecli set slides.pptx "/slide[1]/placeholder[footer]" --prop text="Confidential"

query

officecli query slides.pptx "placeholder"

Note: If a placeholder does not exist on the slide, it is automatically cloned from the associated slide layout when accessed.


Based on OfficeCLI v1.0.64

Clone this wiki locally