I'm attempting to write a google apps script that takes the slide titles of every slide (as they are in the master slides) and put them in a nicely formatted table of contents on slide 2.
It doesn't necessarily have to be done with apps script, but this is the best way I could think of.
function readPageElementIds(presentationId, pageId) {
var response = Slides.Presentations.get(
presentationId);
Logger.log(response.slides)
for (var i = 0; i < response.slides.length; i++) {
var slide = response.slides[i].pageElements;
for (var j = 0; j < slide.length; j++) {
if (slide[j].shape) {
var texts = slide[j].shape.text.textElements;
for (var k = 0; k < texts.length; k++) {
if (texts[k].autoText) {
Logger.log(texts[k].autoText.content);
}
}
}
}
}
}
Yes that's a lot of for loops, I have no idea how to do this.