Skip to content

ppt shape set

zmworm edited this page Mar 26, 2026 · 17 revisions

PowerPoint: Shape - Set

Modify shape properties, text, styling, animation, and sub-elements (runs, paragraphs).

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

Properties

All properties from Shape-Add, plus:

Property Accepted Values Description
animation animation format Animation effect
textWarp warp preset Text warp / WordArt
image file path Image fill
shadow hex color Shape shadow
glow hex color Shape glow
reflection bool Shape reflection
spacing / charSpacing / letterSpacing points Character spacing
indent EMU or units Paragraph first-line indent
marginLeft / marL EMU or units Paragraph left margin
marginRight / marR EMU or units Paragraph right margin
baseline super/sub/none/percent Baseline shift
superscript bool Superscript text
subscript bool Subscript text
textFill / textGradient gradient format Gradient fill on text
geometry / path / preset SVG-like path or preset name Custom geometry path or preset shape (e.g. roundRect, ellipse)
motionPath motion path format Motion path animation (none to remove)
3drotation / 3d.rotation "rotX,rotY,rotZ" or none 3D rotation (alias)
3ddepth / 3d.depth points or none Extrusion depth (alias)
flipH bool Flip horizontally
flipV bool Flip vertically
softEdge points or none Soft edge radius
rot3d / rotation3d "rotX,rotY,rotZ" or none 3D rotation
rotX degrees 3D rotation X-axis
rotY degrees 3D rotation Y-axis
rotZ degrees 3D rotation Z-axis
bevel / bevelTop preset or "preset-width-height" Top bevel
bevelBottom preset or "preset-width-height" Bottom bevel
depth / extrusion points or none Extrusion depth
material warmMatte/plastic/metal/etc. 3D material
lighting / lightRig threePt/balanced/soft/harsh/etc. 3D lighting
zorder / z-order front/back/forward/backward/position Z-order
lineSpacing pt or % Line spacing
spaceBefore pt Space before paragraph
spaceAfter pt Space after paragraph

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: For lineWidth, bare numbers (no unit suffix) are now treated as points instead of EMU.

Note: Custom geometry coordinates now use 0-100 relative space (internally scaled x1000 to OOXML 0-100000). Previously raw EMU-scale integers were required.

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

Note: Gradient readback returns semicolon format (e.g. linear;C1;C2;angle).

Motion Path Format

Format: "M x y L x y E[-DURATION[-TRIGGER[-delay=N][-easing=N]]]" or none

Coordinates are normalized 0.0-1.0. Use none to remove.

officecli set slides.pptx /slide[1]/shape[1] --prop "motionPath=M 0.0 0.0 L 1.0 1.0 E-500-click"

Animation Format

Format: EFFECT[-CLASS[-DURATION[-TRIGGER]]] or none

Effects: appear, fade, fly, zoom, wipe, bounce, float, split, wheel, spin, grow, swivel, checkerboard, blinds, bars, box, circle, diamond, dissolve, flash, plus, random, strips, wedge, bold, wave, crawl, swipe

Classes: entrance (default), exit, emphasis

Duration: milliseconds (default 400)

Trigger: click (default for 1st animation), after (default for subsequent), with/withPrevious

Additional segments (flexible order after effect name, identified by content):

  • Direction: left, right, up, down
  • delay=N: Delay in ms
  • easein=N: Ease-in percentage
  • easeout=N: Ease-out percentage

Note: Opacity values > 1.0 are treated as percentages.

Examples

# Change text and style
officecli set slides.pptx /slide[1]/shape[1] --prop text="Updated text" --prop bold=true

# Move and resize
officecli set slides.pptx /slide[1]/shape[1] --prop x=5cm --prop y=5cm --prop width=15cm --prop height=8cm

# Set animation
officecli set slides.pptx /slide[1]/shape[1] --prop animation=fade-entrance-400
officecli set slides.pptx /slide[1]/shape[1] --prop animation=flyIn-left-300-after-delay=200-easein=50
officecli set slides.pptx /slide[1]/shape[1] --prop animation=zoom-exit-500-with
officecli set slides.pptx /slide[1]/shape[1] --prop animation=none

# Set hyperlink
officecli set slides.pptx /slide[1]/shape[1] --prop link=https://example.com

Run Properties

Set properties on a specific text run within a shape.

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

Property Accepted Values Description
text text Run text
font font name Font
size number (pt) Size
bold bool Bold
italic bool Italic
color hex RGB Color
underline single, double, heavy, dotted, dash, wavy, none Underline
strike single, double, none Strikethrough
spacing / charSpacing points Character spacing
baseline super, sub, none, or percentage Baseline shift
link URL Hyperlink
officecli set slides.pptx /slide[1]/shape[1]/run[1] --prop bold=true --prop color=FF0000

Paragraph Properties

Set properties on a specific paragraph.

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

Property Accepted Values Description
align left, center, right, justify Alignment
link URL Hyperlink (applies to all runs)
lineSpacing pt or % Line spacing
spaceBefore pt Space before paragraph
spaceAfter pt Space after paragraph
+ all run properties Applied to all runs
officecli set slides.pptx /slide[1]/shape[1]/paragraph[1] --prop align=center

Based on OfficeCLI v1.0.22

Clone this wiki locally