Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

command add ppt

zmworm edited this page Apr 29, 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
ole oleobject, embed, embeddedobject /slide[N] PPT-OLE-Add

OLE / Embedded Object

Embed an Office (or other OLE-compatible) document as an object on a slide. The embedded source file is copied into the package; PowerPoint will render it either as an inline preview or as a clickable icon.

Property Required Description
src yes Path to the file to embed (.docx, .xlsx, .pptx, .pdf, etc.). Alias: path.
progId no OLE ProgID (e.g. Word.Document.12, Excel.Sheet.12, Package). Auto-detected from src extension when omitted.
width no Display width as unit-qualified size (6cm, 2in, 160pt) or raw EMU.
height no Display height as unit-qualified size (4cm, 1.5in, 120pt) or raw EMU.
display no icon (default, shows an icon + filename) or content (shows a live inline preview).
icon no Path to a custom icon image (only meaningful with display=icon).
name no Display name shown under the icon.

Examples

×ばつ 4cm officecli add deck.pptx /slide[1] --type ole --prop src="memo.docx" --prop --prop height="4cm" # Embed a PDF as an icon with a custom label officecli add deck.pptx /slide[1] --type ole --prop src="report.pdf" --prop display=icon --prop name="Q3 Report"">
# Embed an Excel workbook on slide 1 at default size
officecli add deck.pptx /slide[1] --type ole --prop src=sales.xlsx
# Embed a Word document at 6cm ×ばつ 4cm
officecli add deck.pptx /slide[1] --type ole --prop src=memo.docx --prop width=6cm --prop height=4cm
# Embed a PDF as an icon with a custom label
officecli add deck.pptx /slide[1] --type ole --prop src=report.pdf --prop display=icon --prop name="Q3 Report"

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.64

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /