What's new in PowerPoint JavaScript API 1.5

PowerPointApi 1.5 added APIs to select slides, text ranges, and shapes within presentations. Prior to this release, selecting slides and shapes required a complicated series of steps. These selection APIs enable developers to directly select slides, text ranges, and shapes, creating a more efficient and intuitive add-in development process.

API list

The following table lists the PowerPoint JavaScript API requirement set 1.5. For a complete list of all PowerPoint JavaScript APIs (including preview APIs and previously released APIs), see all PowerPoint JavaScript APIs.

Class Fields Description
Presentation getSelectedShapes() Returns the selected shapes in the current slide of the presentation.
getSelectedSlides() Returns the selected slides in the current view of the presentation.
getSelectedTextRange() Returns the selected PowerPoint.TextRange in the current view of the presentation.
getSelectedTextRangeOrNullObject() Returns the selected PowerPoint.TextRange in the current view of the presentation.
id Gets the ID of the presentation.
setSelectedSlides(slideIds: string[]) Selects the slides in the current view of the presentation.
Shape getParentSlide() Returns the parent PowerPoint.Slide object that holds this Shape.
getParentSlideLayout() Returns the parent PowerPoint.SlideLayout object that holds this Shape.
getParentSlideLayoutOrNullObject() Returns the parent PowerPoint.SlideLayout object that holds this Shape.
getParentSlideMaster() Returns the parent PowerPoint.SlideMaster object that holds this Shape.
getParentSlideMasterOrNullObject() Returns the parent PowerPoint.SlideMaster object that holds this Shape.
getParentSlideOrNullObject() Returns the parent PowerPoint.Slide object that holds this Shape.
ShapeScopedCollection getCount() Gets the number of shapes in the collection.
getItem(key: string) Gets a shape using its unique ID.
getItemAt(index: number) Gets a shape using its zero-based index in the collection.
getItemOrNullObject(id: string) Gets a shape using its unique ID.
items Gets the loaded child items in this collection.
Slide setSelectedShapes(shapeIds: string[]) Selects the specified shapes.
SlideScopedCollection getCount() Gets the number of slides in the collection.
getItem(key: string) Gets a slide using its unique ID.
getItemAt(index: number) Gets a slide using its zero-based index in the collection.
getItemOrNullObject(id: string) Gets a slide using its unique ID.
items Gets the loaded child items in this collection.
TextFrame getParentShape() Returns the parent PowerPoint.Shape object that holds this TextFrame.
TextRange getParentTextFrame() Returns the parent PowerPoint.TextFrame object that holds this TextRange.
length Gets or sets the length of the range that this TextRange represents.
setSelected() Selects this TextRange in the current view.
start Gets or sets zero-based index, relative to the parent text frame, for the starting position of the range that this TextRange represents.

See also