Gists

This is a sample script for adding the slide page link to the shape using Google Apps Script.

When I use Google Slides, there is the case that I want to jump to the specific slide on the same Google Slides. And, I have the case that I want to jump from the last slide to the 1st slide. In those cases, I had manually added the slide page link to each shape. But when the number of slides are large, I thought that when a script for achieving this is prepared, it will be useful. So I created this.

## Sample script:

// In this case, these values are the text in the shape. You can see this at Demo.
const jumpList = [
];

const slides = SlidesApp.getActivePresentation().getSlides();
const obj = jumpList.reduce(
(o, e, i) => Object.assign(o, { [e]: slides[i] }),
{}
);
slides.forEach((e) =>
e.getShapes().forEach((s) => {
const text = s.getText().asString().trim();

SlidesApp.getActivePresentation()