@@ -187609,6 +187609,18 @@ declare namespace PowerPoint {
187609187609 select?: string;
187610187610 expand?: string;
187611187611 }): PowerPoint.Presentation;
187612+ /**
187613+ * Occurs when the selection of slides in the presentation changes.
187614+ This event is raised when the user selects a different slide or changes the selection of slides.
187615+ This event is not raised when the selection of the contents (for example, shapes) in the slide changes.
187616+ *
187617+ * @remarks
187618+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
187619+ *
187620+ * @eventproperty
187621+ * @beta
187622+ */
187623+ readonly onSlideSelectionChanged: OfficeExtension.EventHandlers<PowerPoint.SlideSelectionChangedEventArgs>;
187612187624 /**
187613187625 * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
187614187626 * Whereas the original `PowerPoint.Presentation` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.PresentationData`) that contains shallow copies of any loaded child properties from the original object.
@@ -187622,6 +187634,15 @@ declare namespace PowerPoint {
187622187634 * [Api set: PowerPointApi 1.3]
187623187635 */
187624187636 interface AddSlideOptions {
187637+ /**
187638+ * Specifies the 0-based index at which the new slide should be inserted.
187639+ If not specified or if the specified index is out of bounds, the new slide will be added at the end of the presentation.
187640+ *
187641+ * @remarks
187642+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
187643+ * @beta
187644+ */
187645+ index?: number;
187625187646 /**
187626187647 * Specifies the ID of a Slide Layout to be used for the new slide.
187627187648 If no `layoutId` is provided, but a `slideMasterId` is provided, then the ID of the first layout from the specified Slide Master will be used.
@@ -187978,6 +187999,52 @@ declare namespace PowerPoint {
187978187999 */
187979188000 toJSON(): PowerPoint.Interfaces.CustomXmlPartCollectionData;
187980188001 }
188002+ /**
188003+ * Represents a graphic object in PowerPoint.
188004+ *
188005+ * @remarks
188006+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
188007+ * @beta
188008+ */
188009+ class Graphic extends OfficeExtension.ClientObject {
188010+ /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */
188011+ context: RequestContext;
188012+ /**
188013+ * Returns the `Shape` object associated with the graphic.
188014+ *
188015+ * @remarks
188016+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
188017+ * @beta
188018+ */
188019+ readonly shape: PowerPoint.Shape;
188020+ convertToShape(): PowerPoint.ShapeScopedCollection;
188021+ /**
188022+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
188023+ *
188024+ * @param options Provides options for which properties of the object to load.
188025+ */
188026+ load(options?: PowerPoint.Interfaces.GraphicLoadOptions): PowerPoint.Graphic;
188027+ /**
188028+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
188029+ *
188030+ * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load.
188031+ */
188032+ load(propertyNames?: string | string[]): PowerPoint.Graphic;
188033+ /**
188034+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
188035+ *
188036+ * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load.
188037+ */
188038+ load(propertyNamesAndPaths?: {
188039+ select?: string;
188040+ expand?: string;
188041+ }): PowerPoint.Graphic;
188042+ /**
188043+ * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
188044+ * Whereas the original `PowerPoint.Graphic` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.GraphicData`) that contains shallow copies of any loaded child properties from the original object.
188045+ */
188046+ toJSON(): PowerPoint.Interfaces.GraphicData;
188047+ }
187981188048 /**
187982188049 * Represents the available options when adding a {@link PowerPoint.Hyperlink}.
187983188050 *
@@ -190660,6 +190727,53 @@ declare namespace PowerPoint {
190660190727 */
190661190728 chartPlus = "ChartPlus",
190662190729 }
190730+ /**
190731+ * Represents the available options when adding a picture (represented by a {@link PowerPoint.Shape} object).
190732+ *
190733+ * @remarks
190734+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
190735+ * @beta
190736+ */
190737+ interface PictureAddOptions {
190738+ /**
190739+ * Specifies the height, in points, of the picture.
190740+ When not provided, the default value is 72 points (1 inch).
190741+ Throws an `InvalidArgument` exception when set with a negative value.
190742+ *
190743+ * @remarks
190744+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
190745+ * @beta
190746+ */
190747+ height?: number;
190748+ /**
190749+ * Specifies the distance, in points, from the left side of the picture to the left side of the slide.
190750+ When not provided, the default value is 0.
190751+ *
190752+ * @remarks
190753+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
190754+ * @beta
190755+ */
190756+ left?: number;
190757+ /**
190758+ * Specifies the distance, in points, from the top edge of the picture to the top edge of the slide.
190759+ When not provided, the default value is 0.
190760+ *
190761+ * @remarks
190762+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
190763+ * @beta
190764+ */
190765+ top?: number;
190766+ /**
190767+ * Specifies the width, in points, of the picture.
190768+ When not provided, the default value is 72 points (1 inch).
190769+ Throws an `InvalidArgument` exception when set with a negative value.
190770+ *
190771+ * @remarks
190772+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
190773+ * @beta
190774+ */
190775+ width?: number;
190776+ }
190663190777 /**
190664190778 * Represents the available options when adding shapes.
190665190779 *
@@ -192874,6 +192988,18 @@ declare namespace PowerPoint {
192874192988 * @returns The newly inserted shape.
192875192989 */
192876192990 addLine(connectorType?: "Straight" | "Elbow" | "Curve", options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape;
192991+ /**
192992+ * Adds a picture to the slide. Returns a `Shape` object that represents the new picture.
192993+ *
192994+ * @remarks
192995+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
192996+ * @beta
192997+ *
192998+ * @param base64EncodedImage The base64-encoded image data.
192999+ * @param options Optional. Additional options such as the position of the picture.
193000+ * @returns The newly inserted shape.
193001+ */
193002+ addPicture(base64EncodedImage: string, options?: PowerPoint.PictureAddOptions): PowerPoint.Shape;
192877193003 /**
192878193004 * Adds a table to the slide. Returns a `Shape` object that represents the new table.
192879193005 Use the `Shape.table` property to get the `Table` object for the shape.
@@ -194368,6 +194494,15 @@ declare namespace PowerPoint {
194368194494 * [Api set: PowerPointApi 1.8]
194369194495 */
194370194496 readonly type: PowerPoint.SlideLayoutType | "Blank" | "Chart" | "ChartAndText" | "ClipArtAndText" | "ClipArtAndVerticalText" | "Comparison" | "ContentWithCaption" | "Custom" | "FourObjects" | "LargeObject" | "MediaClipAndText" | "Mixed" | "Object" | "ObjectAndText" | "ObjectAndTwoObjects" | "ObjectOverText" | "OrganizationChart" | "PictureWithCaption" | "SectionHeader" | "Table" | "Text" | "TextAndChart" | "TextAndClipArt" | "TextAndMediaClip" | "TextAndObject" | "TextAndTwoObjects" | "TextOverObject" | "Title" | "TitleOnly" | "TwoColumnText" | "TwoObjects" | "TwoObjectsAndObject" | "TwoObjectsAndText" | "TwoObjectsOverText" | "VerticalText" | "VerticalTitleAndText" | "VerticalTitleAndTextOverChart";
194497+ /**
194498+ * Deletes the slide layout from the presentation. Does nothing if the slide layout doesn't exist.
194499+ Throws the `GeneralException` error if the slide layout is in use.
194500+ *
194501+ * @remarks
194502+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
194503+ * @beta
194504+ */
194505+ delete(): void;
194371194506 /**
194372194507 * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
194373194508 *
@@ -194570,6 +194705,15 @@ declare namespace PowerPoint {
194570194705 * [Api set: PowerPointApi 1.3]
194571194706 */
194572194707 readonly name: string;
194708+ /**
194709+ * Deletes the slide master and all child layouts from the presentation. Does nothing if the slide master doesn't exist.
194710+ Throws the `GeneralException` error if the slide master is in use.
194711+ *
194712+ * @remarks
194713+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
194714+ * @beta
194715+ */
194716+ delete(): void;
194573194717 /**
194574194718 * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
194575194719 *
@@ -195454,6 +195598,14 @@ declare namespace PowerPoint {
195454195598 * [Api set: PowerPointApi 1.3]
195455195599 */
195456195600 delete(): void;
195601+ /**
195602+ * Returns a {@link PowerPoint.Graphic} object if this shape is a {@link PowerPoint.ShapeType| ShapeType.graphic}. If this shape isn't a `Graphic`, an object with an `isNullObject` property set to `true` is returned. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}.
195603+ *
195604+ * @remarks
195605+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
195606+ * @beta
195607+ */
195608+ getGraphicOrNullObject(): PowerPoint.Graphic;
195457195609 /**
195458195610 * Renders an image of the shape.
195459195611 *
@@ -196348,6 +196500,23 @@ declare namespace PowerPoint {
196348196500 */
196349196501 toJSON(): PowerPoint.Interfaces.SlideScopedCollectionData;
196350196502 }
196503+ /**
196504+ * Provides information about the slide selection changed event.
196505+ *
196506+ * @remarks
196507+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
196508+ * @beta
196509+ */
196510+ interface SlideSelectionChangedEventArgs {
196511+ /**
196512+ * Gets the array of IDs of the currently selected slides.
196513+ *
196514+ * @remarks
196515+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
196516+ * @beta
196517+ */
196518+ slideIds: string[];
196519+ }
196351196520 /**
196352196521 * Represents the collection of Slide Masters in the presentation.
196353196522 *
@@ -197346,6 +197515,9 @@ declare namespace PowerPoint {
197346197515 interface CustomXmlPartCollectionData {
197347197516 items?: PowerPoint.Interfaces.CustomXmlPartData[];
197348197517 }
197518+ /** An interface describing the data returned by calling `graphic.toJSON()`. */
197519+ interface GraphicData {
197520+ }
197349197521 /** An interface describing the data returned by calling `hyperlinkScopedCollection.toJSON()`. */
197350197522 interface HyperlinkScopedCollectionData {
197351197523 items?: PowerPoint.Interfaces.HyperlinkData[];
@@ -198633,6 +198805,27 @@ declare namespace PowerPoint {
198633198805 */
198634198806 namespaceUri?: boolean;
198635198807 }
198808+ /**
198809+ * Represents a graphic object in PowerPoint.
198810+ *
198811+ * @remarks
198812+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
198813+ * @beta
198814+ */
198815+ interface GraphicLoadOptions {
198816+ /**
198817+ Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`).
198818+ */
198819+ $all?: boolean;
198820+ /**
198821+ * Returns the `Shape` object associated with the graphic.
198822+ *
198823+ * @remarks
198824+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
198825+ * @beta
198826+ */
198827+ shape?: PowerPoint.Interfaces.ShapeLoadOptions;
198828+ }
198636198829 /**
198637198830 * Represents a scoped collection of hyperlinks.
198638198831 *
0 commit comments