Edit

Share via


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.

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:

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 PowerPoint JavaScript APIs.

Class Fields Description
Adjustments count Specifies the number of adjustment points.
get(index: number) Gets the adjustment value at the specified zero-based index.
BulletFormat style Specifies the style of the bullets in the paragraph.
type Specifies the type of the bullets in the paragraph.
CustomPropertyCollection getItemAt(index: number) Gets a CustomProperty by its zero-based index in the collection.
CustomXmlPartCollection getItemAt(index: number) Gets a CustomXmlPart by its zero-based index in the collection.
CustomXmlPartScopedCollection getItemAt(index: number) Gets a CustomXmlPart by its zero-based index in the collection.
Hyperlink delete() Deletes the hyperlink.
getLinkedShapeOrNullObject() Returns the PowerPoint.Shape object that the hyperlink is applied to.
getLinkedTextRangeOrNullObject() Returns the PowerPoint.TextRange object that the hyperlink is applied to.
type Returns the type of object that the hyperlink is applied to.
HyperlinkAddOptions address Specifies the address of the hyperlink, which can be a URL, a file name or file path, or an email address with the mailto URI scheme.
screenTip Specifies the string displayed when hovering over the hyperlink.
HyperlinkCollection add(target: TextRange | Shape, options?: PowerPoint.HyperlinkAddOptions) Adds a hyperlink to the specified target with the given options.
HyperlinkScopedCollection getCount() Gets the number of hyperlinks in the collection.
getItemAt(index: number) Gets a hyperlink using its zero-based index in the collection.
items Gets the loaded child items in this collection.
PageSetup slideHeight Specifies the height of the slides in the presentation, in points.
slideWidth Specifies the width of the slides in the presentation, in points.
ParagraphFormat indentLevel Represents the indent level of the paragraph.
Presentation pageSetup Returns the page setup information whose properties control slide setup attributes for the presentation.
Shape adjustments Returns an Adjustments object that contains adjustment values for all the adjustments in this shape.
creationId Gets the creation ID of the shape.
getImageAsBase64(options?: PowerPoint.ShapeGetImageOptions) Renders an image of the shape.
getTextFrameOrNullObject() Returns the PowerPoint.TextFrame object of this Shape.
rotation Specifies the rotation, in degrees, of the shape around the z-axis.
setHyperlink(options?: PowerPoint.HyperlinkAddOptions) Sets a hyperlink on this Shape with the specified options.
visible Specifies if the shape is visible.
ShapeGetImageOptions format The desired format of the resulting image.
height The desired height of the resulting image in pixels.
width The desired width of the resulting image in pixels.
ShapeGroup creationId Gets the creation ID of the shape group.
Slide background Gets the background of the slide.
themeColorScheme Returns the ThemeColorScheme of the slide.
SlideBackground areBackgroundGraphicsHidden Specifies whether the slide layout background fill hides or displays background graphic objects from the slide master.
fill Returns the fill formatting of the background.
isMasterBackgroundFollowed Specifies if the slide background follows the slide master background.
reset() Resets the fill formatting of the slide background.
SlideBackgroundFill getGradientFillOrNullObject() Gets the gradient fill properties.
getPatternFillOrNullObject() Gets the pattern fill properties.
getPictureOrTextureFillOrNullObject() Gets the picture or texture fill properties.
getSolidFillOrNullObject() Gets the solid fill properties.
setGradientFill(options?: PowerPoint.SlideBackgroundGradientFillOptions) Sets the fill formatting of the slide background to a gradient fill.
setPatternFill(options?: PowerPoint.SlideBackgroundPatternFillOptions) Sets the fill formatting of the slide background to a pattern fill.
setPictureOrTextureFill(options?: PowerPoint.SlideBackgroundPictureOrTextureFillOptions) Sets the fill formatting of the slide background to a picture or texture fill.
setSolidFill(options?: PowerPoint.SlideBackgroundSolidFillOptions) Sets the fill formatting of the slide background to a solid fill.
type Returns the fill type of the slide background.
SlideBackgroundGradientFill type Specifies the type of gradient fill.
SlideBackgroundGradientFillOptions type If provided, specifies the type of gradient fill.
SlideBackgroundPatternFill backgroundColor Specifies the background color in HTML color format (e.g., "#FFFFFF" or "white").
foregroundColor Specifies the foreground color in HTML color format (e.g., "#FFA500" or "orange").
pattern Specifies the pattern type.
SlideBackgroundPatternFillOptions backgroundColor If provided, specifies the background color in HTML color format (e.g., "#FFFFFF" or "white").
foregroundColor If provided, specifies the foreground color in HTML color format (e.g., "#FFA500" or "orange").
pattern If provided, specifies the pattern type.
SlideBackgroundPictureOrTextureFill setImage(base64EncodedImage: string) Sets the image used to fill.
transparency Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear).
SlideBackgroundPictureOrTextureFillOptions imageBase64 If provided, specifies the Base64-encoded image data for the fill.
transparency If provided, specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear).
SlideBackgroundSolidFill color Specifies the fill color in HTML color format (e.g., "#FFA500" or "orange").
transparency Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear).
SlideBackgroundSolidFillOptions color If provided, specifies the fill color in HTML color format (e.g., "#FFA500" or "orange").
transparency If provided, specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear).
SlideCollection exportAsBase64Presentation(values: Array<string | Slide>) Exports one or more slides found in this collection to their own presentation file, returned as Base64-encoded data.
SlideLayout background Gets the background of the slide layout.
themeColorScheme Returns the ThemeColorScheme of the slide layout.
SlideLayoutBackground areBackgroundGraphicsHidden Specifies whether the slide layout background fill hides or displays background graphic objects from the slide master.
fill Returns the fill formatting of the background.
isMasterBackgroundFollowed Specifies if the slide layout background follows the slide master background.
reset() Resets the fill formatting of the slide layout background.
SlideMaster background Gets the background of the Slide Master.
themeColorScheme Returns the ThemeColorScheme of the Slide Master.
SlideMasterBackground fill Returns the fill formatting of the background.
SlideScopedCollection exportAsBase64Presentation() Exports all slides in this collection to their own presentation file, returned as Base64-encoded data.
TextRange hyperlinks Returns a collection of hyperlinks that exist on this TextRange.
setHyperlink(options?: PowerPoint.HyperlinkAddOptions) Sets a hyperlink on this TextRange with the specified options.
ThemeColorScheme getThemeColor(color: PowerPoint.ThemeColor) Gets the color value for the specified ThemeColor.
setThemeColor(color: PowerPoint.ThemeColor, rgbColor: string) Sets the color value for the specified ThemeColor.

See also