-
Notifications
You must be signed in to change notification settings - Fork 120
powerpoint reference
zmworm edited this page Apr 5, 2026
·
30 revisions
Complete reference for OfficeCLI operations on PowerPoint documents.
| Element | Path | Operations |
|---|---|---|
| Presentation | / |
set, get |
| Slide | /slide[N] |
add, set |
| Shape | /slide[N]/shape[M] |
add, set |
| Placeholder | /slide[N]/placeholder[X] |
set (same as Shape) |
| Picture | /slide[N]/picture[M] |
add, set |
| Table | /slide[N]/table[M] |
add, set |
| Chart | /slide[N]/chart[M] |
add, set |
| Theme | /theme |
get, set |
| Morph Check | /morph-check |
get |
| Connector | via shape index | add, set, get |
| Group | /slide[N]/group |
add, set, get |
| Video / Audio | /slide[N]/video[M] |
add, set |
| Equation | /slide[N]/equation |
add, set |
| Slide Master | /slidemaster[N] |
get, set (name, shapes) |
| Slide Layout | /slidelayout[N] |
get, set (name, shapes) |
| Paragraph | /slide[N]/shape[M]/paragraph[P] |
add, set, get |
| Run | /slide[N]/shape[M]/paragraph[P]/run[R] |
add, set, get |
| Notes | /slide[N]/notes |
add |
| Zoom | /slide[N]/zoom[M] |
add, set, get, query, remove |
| 3D Model | /slide[N]/model3d[M] |
add, set, get, remove |
| Shorthand | Expands to | Description |
|---|---|---|
/slide[1]/table[1]/cell[2,3] |
/slide[1]/table[1]/tr[2]/tc[3] |
Table cell by row,col |
Elements can be referenced by stable ID or name instead of positional index:
| Path | Description |
|---|---|
shape[@id=5] |
Shape by cNvPr ID |
shape[@name=MyShape] |
Shape by name (case-insensitive) |
picture[@id=8] |
Picture by ID |
table[@id=12] |
Table by ID |
chart[@id=10] |
Chart by ID |
connector[@id=15] |
Connector by ID |
group[@id=20] |
Group by ID |
Get output now returns @id= paths when available, making them stable across insertions/deletions.
Deterministic IDs: Shape IDs are assigned using a global increment counter (starting from max existing ID), ensuring reproducible results across identical batch scripts. Word paraId/textId use the same deterministic approach.
Morph name matching: shape[@name=MyBox] matches both MyBox and !!MyBox (morph prefix). This means you don't need to know whether the !! prefix has been applied.
# Get element tree
officecli get slides.pptx /slide[1] --depth 2
# Get raw properties
officecli get slides.pptx /slide[1]/shape[1]| Part Path | Description |
|---|---|
/ or /presentation
|
Presentation XML |
/slide[N] |
Slide XML |
/slideMaster[N] |
Master XML |
/slideLayout[N] |
Layout XML |
/noteSlide[N] |
Notes XML |
XPath prefixes: p (PresentationML), a (DrawingML), r (Relationships)
officecli raw slides.pptx /slide[1]
officecli raw slides.pptx /slideMaster[1]Based on OfficeCLI v1.0.35