5

In Google Slides, it's possible to set a slide to be "skipped" in presentation mode (as described here).

However, the automated page numbering still includes skipped slides (meaning that in presentation mode, if slide 4 is skipped, the slide numbering jumps straight from 3 to 5).

I want to use Google Apps Script to generate my own slide numbers so only non-skipped slides are counted. But I don't know how to check if a slide is marked as "skipped."

Here's what I have in mind:

function genSlideNumbers() {
  var preso = SlidesApp.openById('PRESENTATION_ID');
  var slides = preso.getSlides()
  var slide_num = 1
  for (var i = 0; i < slides.length; i++) {
    slide = slides[i]
    if ( /* ?? slide is "skipped" ?? */ ) {
      slides[i].insertTextBox(slide_num);
      slide_num++;
    }
  }
}

Is it possible?

Edit: Not a duplicate of this question because I'm not asking how to skip a slide; I'm asking if there's any way to tell if a slide is skipped.

soulshake
  • 780
  • 8
  • 12
  • Did you review the existing questions? https://stackoverflow.com/questions/51878119/how-to-skip-slides-in-google-slides-with-google-apps-script https://stackoverflow.com/questions/47740005/finding-whether-the-slide-is-skipped-or-not-using-gas – tehhowch Apr 17 '19 at 17:39
  • Possible duplicate of [How to skip slides in Google Slides with Google Apps Script?](https://stackoverflow.com/questions/51878119/how-to-skip-slides-in-google-slides-with-google-apps-script) – tehhowch Apr 17 '19 at 17:41
  • Thanks, but yes, I did see that question. I'm not asking how to skip a slide; I'm asking if there's any way to tell if a slide is skipped. Related, but not the same. – soulshake Apr 17 '19 at 17:44
  • If the API has no support (what that answer says) then you can't do anything with that property. – tehhowch Apr 17 '19 at 17:46
  • Sorry, I didn't notice [the second link](https://stackoverflow.com/questions/47740005/finding-whether-the-slide-is-skipped-or-not-using-gas) in the first comment. I had missed that question indeed. This issue is tracked [here](https://issuetracker.google.com/issues/70530893). – soulshake Apr 17 '19 at 18:13

2 Answers2

1

As of 10/25/2019 there is no API access to the Skip Slide flag in the Slide or Presentation classes. Which means there's no method (using only Apps Script) to determine which slides to skip.

Ideally, there would be slide.getSkip() and slide.setSkip() methods, but they don't currently exist. You can request them here.

1

Update: There is now a method slide.isSkipped() which determines if the slide is marked as skipped. (Also slide.setSkipped() to set whether the slide will be skipped.)

Aaron Dunigan AtLee
  • 1,860
  • 7
  • 18