PowerPoint.InsertSlideFormatting enum
Specifies the formatting options for when slides are inserted.
Remarks
[ API set: PowerPointApi 1.2 ]
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/slide-management/insert-slides.yaml
await PowerPoint.run(async function(context) {
// Get the ID of the first selected slide.
const presentation: PowerPoint.Presentation = context.presentation;
const selected: PowerPoint.Slide = presentation.getSelectedSlides().getItemAt(0);
selected.load("id");
await context.sync();
// Insert the other presentation after the selected slide.
const insertOptions: PowerPoint.InsertSlideOptions = {
formatting: PowerPoint.InsertSlideFormatting.useDestinationTheme,
targetSlideId: selected.id
};
presentation.insertSlidesFromBase64(chosenFileBase64, insertOptions);
await context.sync();
});
Fields
keepSourceFormatting = "KeepSourceFormatting" | Copy the source theme into the target presentation and use that theme. |
useDestinationTheme = "UseDestinationTheme" | Use the existing theme in the target presentation. |