編輯

共用方式為


What's new in PowerPoint JavaScript API 1.3

PowerPointApi 1.3 added additional support for slide management and custom tagging.

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

Feature area Description Relevant objects
Slide management Adds support for adding slides as well as managing slide layouts and slide masters. Slide
SlideLayout
SlideMaster
Tags Allows add-ins to attach custom metadata, in the form of key-value pairs. Tag

API list

The following table lists the PowerPoint JavaScript API requirement set 1.3. For a complete list of all PowerPoint JavaScript APIs (including preview APIs and previously released APIs), see all PowerPoint 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.
shapes Returns a collection of shapes in 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.
shapes Returns a collection of shapes in 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