Skip to content

ppt shape add

zmworm edited this page Mar 19, 2026 · 54 revisions

PowerPoint: Shape - Add

Add shapes and text boxes to a slide with text, fill, position, and styling.

Path: /slide[N] (parent)

Properties

Property Default Description
text (empty) Text content (supports \n for line breaks)
name TextBox {N} Shape name
x, y - Position (EMU or units: cm, in, pt, px)
width, height - Size (EMU or units)
font Calibri Font family
size 11 Font size (pt)
bold false Bold text
italic false Italic text
underline false true/single, double, false/none
strikethrough false true/single, double, false/none
color 000000 Font color (hex RGB or theme: accent1-6, dk1, dk2, lt1, lt2)
shadow - Text shadow color (hex)
glow - Text glow color (hex)
reflection false Text reflection
fill - Shape fill (hex) or none
gradient - Gradient fill (e.g., C1-C2, radial:C1-C2-center)
line - Border color
lineWidth - Border width
lineDash - solid, sysDot, sysDash, dash, dashDot, lgDash, lgDashDot, lgDashDotDot, dot, sysDashDot, sysDashDotDot
preset rect Shape geometry
align - left, center, right, justify
valign center top, center, bottom
margin - Text margin (single or left,top,right,bottom)
autoFit normal true/normal, shape, false/none
rotation 0 Degrees
opacity - 0-1
list - bullet, dash, arrow, check, star, numbered, alpha, roman, none
link - Hyperlink URL
spacing / charSpacing / letterSpacing - Character spacing (points)
indent - Paragraph first-line indent (EMU or units)
marginLeft / marL - Paragraph left margin (EMU or units)
marginRight / marR - Paragraph right margin (EMU or units)
baseline - super, sub, none, or percentage
superscript false Superscript text
subscript false Subscript text
textFill / textGradient - Gradient fill on text (e.g., C1-C2)
geometry / path - SVG-like custom geometry path
flipH false Flip horizontally
flipV false Flip vertically
softEdge - Soft edge radius (points) or none
rot3d / rotation3d - 3D rotation "rotX,rotY,rotZ" or none
rotX - 3D rotation X-axis (degrees)
rotY - 3D rotation Y-axis (degrees)
rotZ - 3D rotation Z-axis (degrees)
bevel / bevelTop - Bevel preset or "preset-width-height"
bevelBottom - Bottom bevel preset or "preset-width-height"
depth / extrusion - Extrusion depth (points) or none
material - warmMatte, plastic, metal, etc.
lighting / lightRig - threePt, balanced, soft, harsh, etc.
zorder / z-order - front, back, forward, backward, or absolute position
lineSpacing - Line spacing (pt or %)
spaceBefore - Space before paragraph (pt)
spaceAfter - Space after paragraph (pt)
animation - Animation (see Shape-Set for format)

Shape Presets

rect, roundRect, ellipse, diamond, triangle, rtTriangle, parallelogram, trapezoid, pentagon, hexagon, octagon, star4, star5, star6, star8, star10, star12, star16, star24, star32, heart, cloud, lightning, sun, moon, rightArrow, leftArrow, upArrow, downArrow, chevron, plus, cross, ribbon

Examples

# Simple text box
officecli add slides.pptx /slide[1] --type shape --prop text="Hello World" --prop x=2cm --prop y=3cm --prop width=10cm --prop height=5cm

# Styled shape with fill
officecli add slides.pptx /slide[1] --type shape --prop text="Important" --prop x=5cm --prop y=5cm --prop width=15cm --prop height=3cm --prop fill=4472C4 --prop color=FFFFFF --prop size=24 --prop bold=true --prop align=center

# Shape with gradient
officecli add slides.pptx /slide[1] --type shape --prop text="Gradient" --prop x=2cm --prop y=10cm --prop width=10cm --prop height=5cm --prop gradient=4472C4-1A1A2E

# Ellipse shape
officecli add slides.pptx /slide[1] --type shape --prop preset=ellipse --prop fill=FF6600 --prop x=15cm --prop y=5cm --prop width=5cm --prop height=5cm

# Bulleted list
officecli add slides.pptx /slide[1] --type shape --prop "text=Item 1\nItem 2\nItem 3" --prop list=bullet --prop x=2cm --prop y=5cm --prop width=20cm --prop height=8cm

Based on OfficeCli v1.0.7

Clone this wiki locally