1
votes

How is it possible to delete a slide from a Google Presentation using Google API?

In https://developers.google.com/slides/samples/slides it is said: The Slides API allows you to create, move, and delete slides. However, I'm unable to find how to do it.

2

2 Answers

1
votes
0
votes

In google app script you can do:

var presentation = SlidesApp.openById("23423423lksdjfsdlkfj");
var slides = presentation.getSlides();
slides[0].remove(); // Remove the first slide

You have to put the proper file id from the long part of the URL of the slide document.