PowerPoint JavaScript preview APIs

New PowerPoint JavaScript APIs are first introduced in "preview" and later become part of a specific, numbered requirement set after sufficient testing occurs and user feedback is acquired.

The first table provides a concise summary of the APIs, while the subsequent table gives a detailed list.

Note

Preview APIs are subject to change and are not intended for use in a production environment. We recommend that you try them out in test and development environments only. Do not use preview APIs in a production environment or within business-critical documents.

To use preview APIs:

Feature area Description Relevant objects
Slide management Adds support for adding slides as well as managing slide layouts and slide masters. Slide
SlideLayout
SlideMaster
Shapes Adds support for getting references to the shapes in a slide. Shape

API list

The following table lists the PowerPoint JavaScript APIs currently in preview. For a complete list of all PowerPoint JavaScript APIs (including preview APIs and previously released APIs), see all Excel JavaScript APIs.

Class Fields Description
AddSlideOptions layoutId Specifies the ID of a Slide Layout to be used for the new slide.
slideMasterId Specifies the ID of a Slide Master to be used for the new slide.
Presentation slideMasters Returns the collection of SlideMaster objects that are in the presentation.
tags Returns a collection of tags attached to the presentation.
Shape delete() Deletes the shape from the shape collection.
id Gets the unique ID of the shape.
tags Returns a collection of tags in the shape.
ShapeCollection 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 layout Gets the layout of the slide.
shapes Returns a collection of shapes in the slide.
slideMaster Gets the SlideMaster object that represents the slide's default content.
tags Returns a collection of tags in the slide.
SlideCollection add(options?: PowerPoint.AddSlideOptions) Adds a new slide at the end of the collection.
SlideLayout id Gets the unique ID of the slide layout.
name Gets the name of the slide layout.
SlideLayoutCollection getCount() Gets the number of layouts in the collection.
getItem(key: string) Gets a layout using its unique ID.
getItemAt(index: number) Gets a layout using its zero-based index in the collection.
getItemOrNullObject(id: string) Gets a layout using its unique ID.
items Gets the loaded child items in this collection.
SlideMaster id Gets the unique ID of the Slide Master.
layouts Gets the collection of layouts provided by the Slide Master for slides.
name Gets the unique name of the Slide Master.
SlideMasterCollection getCount() Gets the number of Slide Masters in the collection.
getItem(key: string) Gets a Slide Master using its unique ID.
getItemAt(index: number) Gets a Slide Master using its zero-based index in the collection.
getItemOrNullObject(id: string) Gets a Slide Master using its unique ID.
items Gets the loaded child items in this collection.
Tag key Gets the unique ID of the tag.
value Gets the value of the tag.
TagCollection add(key: string, value: string) Adds a new tag at the end of the collection.
delete(key: string) Deletes the tag with the given key in this collection.
getCount() Gets the number of tags in the collection.
getItem(key: string) Gets a tag using its unique ID.
getItemAt(index: number) Gets a tag using its zero-based index in the collection.
getItemOrNullObject(key: string) Gets a tag using its unique ID.
items Gets the loaded child items in this collection.

See also