Поделиться через


PowerPoint.InsertSlideFormatting enum

Задает параметры форматирования при вставке слайдов.

Комментарии

[ Набор API: PowerPointApi 1.2 ]

Примеры

// 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 = context.presentation;
    const selected = 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();
});

Поля

keepSourceFormatting = "KeepSourceFormatting"

Скопируйте исходную тему в целевую презентацию и используйте эту тему.

useDestinationTheme = "UseDestinationTheme"

Используйте существующую тему в целевой презентации.