Skip to main content

Shape

PowerPoint.Shape. Handles are live element references; edits apply at once. Import from @reductoai/pptx/officejs.

Shape properties

Shape.delete()

Shape.flip()

Extension (VBA Shape.Flip): mirrors the shape in its box; a second flip undoes the first.

Shape.getChart()

Headless extension: the chart in this graphic frame.

Shape.getImageAsBase64()

Office.js queues a ClientResult; the facade resolves a Base64 PNG of this shape alone.

Shape.getParentSlide()

Shape.getParentSlideLayout()

Shape.getParentSlideLayoutOrNullObject()

Shape.getParentSlideMaster()

Shape.getParentSlideMasterOrNullObject()

Shape.getParentSlideOrNullObject()

Shape.getTable()

Shape.getTextFrameOrNullObject()

Links the whole shape; a click on it follows the link.

Shape.setZOrder()

ShapeCollection

PowerPoint.ShapeCollection of one slide, layout or master. Import from @reductoai/pptx/officejs.

ShapeCollection properties

ShapeCollection.addChart()

Headless extension (VBA Shapes.AddChart2): a column, bar, line, pie or area chart from literal data. Without a size it is 432 x 252 pt.

ShapeCollection.addCopy()

Extension (VBA Shape.Copy then Shapes.Paste): a copy of a shape of this presentation, where the original sits or at options. A copied chart gets its own chart part and data.

ShapeCollection.addGeometricShape()

ShapeCollection.addGroup()

Groups shapes of this collection, given as handles or ids.

ShapeCollection.addLine()

ShapeCollection.addMedia()

Headless extension (VBA Shapes.AddMediaObject2, embedded): an MP4, M4V, MOV, M4A, MP3 or WAV file shown as poster (PNG, JPEG or GIF). Sized and placed as addPicture places the poster.

ShapeCollection.addPicture()

Headless extension (VBA Shapes.AddPicture): a PNG, JPEG, GIF, EMF, WMF or SVG picture, as base64, a data URL or bytes. Without a size it takes its natural size, shrunk to fit the slide; one given side keeps the aspect ratio. Without a position it is centred on the slide.

ShapeCollection.addPlaceholder()

Extension, a superset of VBA Shapes.AddPlaceholder. On a slide it restores the layout’s first missing placeholder of type, as VBA does, and otherwise adds a new one; on a layout or master it adds a new placeholder. Without a box it takes the geometry it inherits.

ShapeCollection.addTable()

A table of rowCount x columnCount cells. Without cell properties it takes PowerPoint’s default look (Medium Style 2 - Accent 1, header row, banded rows); with them it is plain.

ShapeCollection.addTextBox()

ShapeCollection.buildFreeform()

Extension (VBA Shapes.BuildFreeform): a freeform that starts at (x1, y1), in slide points.

ShapeCollection.getCount()

ShapeCollection.getItem()

ShapeCollection.getItemAt()

ShapeCollection.getItemOrNullObject()

Office.js null-object variant; inspect isNullObject before other members.

ShapeAddOptions

Import from @reductoai/pptx/officejs.

PictureAddOptions

Extension: fallbackImage is the bitmap an SVG picture shows where SVG is not read. Import from @reductoai/pptx/officejs.

ShapeGroup

PowerPoint.ShapeGroup: the members of a p:grpSp. Import from @reductoai/pptx/officejs.

ShapeGroup properties

ShapeGroup.ungroup()

Moves the members into the group’s parent at the group’s z-position and removes the group.

FreeformBuilder

Extension (VBA FreeformBuilder): the nodes of a freeform, in slide points, made into a shape by convertToShape. A figure whose last node lands on its first is closed, as in PowerPoint. Import from @reductoai/pptx/officejs.

FreeformBuilder.addNodes()

VBA FreeformBuilder.AddNodes: a corner curve takes two control points and its end, x1..y3.

FreeformBuilder.closeFigure()

Extension (GDI+ GraphicsPath.CloseFigure): joins the figure’s last node to its first.

FreeformBuilder.convertToShape()

VBA FreeformBuilder.ConvertToShape.

FreeformBuilder.startFigure()

Extension (GDI+ GraphicsPath.StartFigure): a new figure of the same shape from (x, y).

PlaceholderFormat

PowerPoint.PlaceholderFormat. Import from @reductoai/pptx/officejs.

PlaceholderFormat properties