Repository navigation
ppt group
goworm edited this page Jul 19, 2026
·
54 revisions
Group multiple shapes together on a slide.
- add - Group shapes by index
- set - Modify group properties
- get - Get group attributes
| Property | Accepted Values | Description |
|---|---|---|
name |
text | Group name |
x, y
|
EMU or units | Position |
width, height
|
EMU or units | Size. (v1.0.139+) Changes only the axis you pass by default — --prop width=20cm alone leaves height untouched (matches plain-shape set behavior). Add keepAspect=true to scale the other axis proportionally too (the pre-v1.0.139 default behavior); give both width and height for an exact box regardless. Children re-scale via the group's chExt baseline on whichever axis actually changes. |
keepAspect |
bool | (v1.0.139+) Set-only modifier for width/height: when true, resizing one axis proportionally scales the other (and re-bakes child font sizes) instead of leaving it fixed. Was the unconditional default before v1.0.139 (GitHub #237). |
rotation / rotate
|
degrees | Rotation |
link |
URL or slide[N]
|
Hyperlink — accepts URL or in-presentation slide jump |
tooltip |
text | Hyperlink tooltip (requires link) |
ungroup |
true |
(v1.0.131+) Dissolve the group: promote every member back onto the slide, flattening each transform from the group's child coordinate space to slide-absolute, then remove the empty group. Set-only, terminal (other props on the same command are ignored). A group rotation is reported as unsupported (positions flatten without rotation compensation). |
fillis rejected.p:grpSpPrdoes not support fill in OOXML — PowerPoint ignores any fill set on a group. Apply fill to the child shapes instead.
| Key | Type | Description |
|---|---|---|
x |
integer | Horizontal position (EMU) |
y |
integer | Vertical position (EMU) |
width |
integer | Width (EMU) |
height |
integer | Height (EMU) |
zorder |
integer | Z-order position |
# Set group position and size
officecli set slides.pptx /slide[1]/group[1] --prop x=2cm --prop y=3cm --prop width=15cm --prop height=10cm
# Add a hyperlink + tooltip
officecli set slides.pptx /slide[1]/group[1] --prop link=https://example.com --prop tooltip="Open docs"
# Dissolve a group back onto the slide (v1.0.131+)
officecli set slides.pptx /slide[1]/group[1] --prop ungroup=true
# Resize one axis only (v1.0.139+ default — height stays fixed)
officecli set slides.pptx /slide[1]/group[1] --prop width=18cm
# Resize proportionally (old default; now opt-in)
officecli set slides.pptx /slide[1]/group[1] --prop width=18cm --prop keepAspect=true
# Get group properties
officecli get slides.pptx /slide[1]/group[1]Based on OfficeCLI v1.0.139