Skip to content

ppt shape get

zmworm edited this page Mar 18, 2026 · 51 revisions

PowerPoint: Shape - get

Returned attributes when getting a shape node.

Path: /slide[N]/shape[M]

Returned Attributes

Key Type Description
name string Shape name
isTitle boolean Whether the shape is a title placeholder
x integer Horizontal position (EMU)
y integer Vertical position (EMU)
width integer Width (EMU)
height integer Height (EMU)
fill string Fill color (hex, e.g. #4472C4) or none
opacity number Fill opacity (0-1)
preset string Preset shape type (e.g. rect, roundRect, ellipse, triangle)
gradient string Gradient definition (e.g., C1-C2-angle for linear, radial:C1-C2-focus for radial)
image string Has image fill (true if present)
list string Bullet character (e.g., ) or auto-number type (e.g., arabicPeriod)
font string Font name
size number Font size (pt)
bold boolean Bold text
italic boolean Italic text
underline string Underline style (e.g., sng, dbl)
strike boolean Strikethrough text
color string Font color (hex)
link string Hyperlink URL
line string Outline color (hex)
lineWidth number Outline width (pt)
lineDash string Outline dash style (solid, dash, dot, dashDot)
lineOpacity number Outline opacity (0-1)
shadow string Shadow color (hex RGB)
glow string Glow color (hex RGB)
reflection string Has reflection (true if present)
animation string Animation effect (format: effectName-class-durationMs)
rotation number Rotation angle (degrees)
margin string Internal margins (e.g. 91440 91440 91440 91440)
valign string Vertical alignment (top, middle, bottom)
textWarp string Text warp preset (e.g. wave1, archUp)
autoFit string Auto-fit mode (normal, shape, none)
align string Horizontal text alignment (left, center, right, justify)
lineSpacing number Line spacing (pt or %)
spaceBefore number Space before paragraph (pt)
spaceAfter number Space after paragraph (pt)

Children

A shape node may contain child elements:

  • paragraph - Text paragraphs
  • run - Text runs within paragraphs

Example

officecli get slides.pptx /slide[1]/shape[1]
/slide[1]/shape[1] (Shape) (2 children)
  name: Title 1
  isTitle: true
  x: 685800
  y: 2286000
  width: 7772400
  height: 1325563
  fill: #4472C4
  opacity: 1
  preset: roundRect
  font: Calibri
  size: 36
  bold: true
  color: #FFFFFF
  align: center
  valign: middle
  shadow: 000000

Placeholder

Placeholders are special shapes tied to a slide layout slot.

Path: /slide[N]/placeholder[X]

Additional Attributes

Key Type Description
phType string Placeholder type (title, body, ctrTitle, subTitle, dt, ftr, sldNum, pic, chart, tbl, dgm)
phIndex integer Placeholder index on the layout

All shape attributes listed above are also available on placeholder nodes.

Example

officecli get slides.pptx /slide[1]/placeholder[0]
/slide[1]/placeholder[0] (Placeholder) (1 children)
  phType: ctrTitle
  phIndex: 0
  name: Title 1
  x: 685800
  y: 2286000
  width: 7772400
  height: 1325563
  font: Calibri
  size: 44
  bold: true
  color: #000000
  align: center
  valign: middle

Based on OfficeCli v1.0.6

Clone this wiki locally