Skip to content

command add ppt

zmworm edited this page Apr 9, 2026 · 54 revisions

add - PowerPoint (.pptx)

Addable element types in PowerPoint documents.

Element Types

Type Aliases Parent Reference
slide - / PPT-Slide-Add
shape textbox /slide[N] PPT-Shape-Add
picture image, img /slide[N] PPT-Picture-Add
chart - /slide[N] PPT-Chart-Add
table - /slide[N] PPT-Table-Add
row tr /slide[N]/table[M] PPT-Table-Add
connector connection, line /slide[N] PPT-Connector-Add
group - /slide[N] PPT-Group-Add
video audio, media /slide[N] PPT-Video-Add
equation formula, math /slide[N] PPT-Equation-Add
notes - /slide[N] PPT-Notes-Add
paragraph para /slide[N]/shape[M] PPT-Paragraph-Add
run - /slide[N]/shape[M], /slide[N]/shape[M]/paragraph[P] PPT-Run-Add
zoom slidezoom, slide-zoom /slide[N] PPT-Zoom-Add

Position by DOM Path

Use --after or --before with a DOM path to insert relative to a sibling:

# Insert a slide after slide 1
officecli add slides.pptx / --type slide --after /slide[1]

# Insert a shape before an existing shape
officecli add slides.pptx /slide[1] --type shape --before /slide[1]/shape[2] --prop text="Before shape 2"

Text-Anchored Insert (--after find:X / --before find:X)

Insert a run at a text-matched position within a shape. Only inline insertion (run type) is supported — block types (shape, table, etc.) cannot use find: anchoring and will result in an error.

# Insert run after matched text
officecli add slides.pptx '/slide[1]/shape[1]' --type run --after find:weather --prop "text= (sunny)"

# Insert before matched text
officecli add slides.pptx '/slide[1]/shape[1]' --type run --before find:weather --prop "text=["

# Regex positioning
officecli add slides.pptx '/slide[1]/shape[1]' --type run --after 'find:\d+' --prop regex=true --prop text=!

See Also


Based on OfficeCLI v1.0.40

Clone this wiki locally