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

ppt shape add

zmworm edited this page May 24, 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 / left, y / top - 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 (see Gradient Format below)
pattern - Pattern fill: <preset> or <preset>:fg[:bg] (e.g. pct25, ltHorz:FF0000, dkCross:red:white). Mutually exclusive with fill/gradient.
blur - Blur effect radius (e.g. 4, 4pt)
line / border / border.color - Border color
lineWidth / border.width - 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: external URL, or internal slide-jump: slide[N], firstslide, lastslide, nextslide, previousslide
tooltip - Hyperlink tooltip text (shown on hover)
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 / preset - SVG-like custom geometry path or preset shape name
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)
motionPath - Motion path animation (see Shape-Set for format)

Note: When a shape has fill=none, setting shadow, glow, reflection, or softedge applies the effect to text runs instead of shape-level properties.

Note: On morph slides, custom-named shapes automatically get the !! prefix.

Note: The first animation on a morph slide defaults to afterPrevious instead of onClick.

Gradient Format

Format Example Description
Simple C1-C2 Two-color linear gradient
With angle C1-C2-angle Linear gradient with angle
Custom stops C1@30-C2@70 Custom stop positions (percent)
Semicolon linear LINEAR;C1;C2;angle Explicit linear gradient
Semicolon radial RADIAL;C1;C2 Radial gradient
Semicolon path PATH;C1;C2 Path gradient

Animation Format

Format: EFFECT[-DIRECTION][-DURATION][-TRIGGER][-delay=N][-easein=N][-easeout=N] or none

Segments after the effect name are identified by content (not position):

  • Direction: left, right, up, down
  • Duration: milliseconds (default 400)
  • Trigger: click (default for 1st), after (default for subsequent), with
  • delay=N: Delay in ms
  • easein=N: Ease-in percentage
  • easeout=N: Ease-out percentage

Example: animation=flyIn-left-300-after-delay=200-easein=50

Shape Presets

See Shape for the full categorized gallery (70+ presets). Common presets:

Basic: rect, roundRect, ellipse, diamond, triangle, rtTriangle, parallelogram, trapezoid, pentagon, hexagon, octagon, decagon, dodecagon

Stars: star4, star5, star6, star8, star10, star12, star16, star24, star32

Arrows: rightArrow, leftArrow, upArrow, downArrow, leftRightArrow, chevron, homePlate, notchedRightArrow, uturnArrow, circularArrow

Callouts: callout1, callout2, callout3, wedgeRoundRectCallout, wedgeEllipseCallout, cloudCallout

Flowchart: process, decision, terminator, document, io, data, predefinedprocess, preparation, manualinput, manualoperation, flowconnector, offpageconnector, multidocument, sort, merge, extract, delay, display, alternateprocess

Symbols: plus, heart, cloud, lightning, sun, moon, arc, donut, cube, can, line, ribbon, smiley, frame, gear6, gear9

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
# Shape with custom gradient stops
officecli add slides.pptx /slide[1] --type shape --prop fill=none --prop "gradient=FF0000@0-00FF00@50-0000FF@100" --prop x=2cm --prop y=2cm --prop width=10cm --prop height=5cm
# Shape with animation (new format)
officecli add slides.pptx /slide[1] --type shape --prop text="Animated" --prop x=5cm --prop y=5cm --prop width=10cm --prop height=5cm --prop animation=flyIn-left-300-after-delay=200-easein=50
# 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

Output

PPT Add and Set for spatial elements return coordinate info and overlap warnings:

Added shape at /slide[1]/shape[3]
 x: 2cm y: 5cm width: 20cm height: 8cm

If a new or repositioned element has the same (x, y) as an existing sibling:

Added shape at /slide[1]/shape[3]
 x: 5cm y: 5cm width: 10cm height: 5cm
 WARNING: Same position as Title 1

This helps AI agents detect layout collisions and use distinct positions.

Master / layout shapes

Typed add / set / remove also work on slide-master and slide-layout shape paths:

officecli add deck.pptx '/slideMaster[1]/shape' --type shape --prop geometry=rect --prop fill=4472C4
officecli set deck.pptx '/slideLayout[1]/shape[2]' --prop fill=none
officecli remove deck.pptx '/slideMaster[1]/shape[3]'

Aliases

  • arrow accepts as alias for rightArrow preset.
  • Line corner attributes and arrowheads are emitted on Get even when PowerPoint's default-suppression would silently drop them, so dump → batch round-trips outline details.
  • effective.X + effective.X.src keys surface for cascaded run/paragraph props (font, size, color, ...), making it explicit whether a value came from the run, paragraph, layout, or master.

Based on OfficeCLI v1.0.97

Clone this wiki locally

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