0

I have a presentation which include 3/4 inserted images on each slide.
the images are all in different positions via scripts.

I’m currently trying to link the images to a slide or two after the current one its on. similar to the link 🔗 option when right clicking the images.

e.g: image 1 on slide [0] links to slide 1
image 2 on slide [0] links to slide 3
image 3 on slide [0] links to slide 3

This will then continue for the next slide as follows:

e.g: image 4 on slide 1 links to slide [3]
image 5 on slide 1 links to slide [4]
image 6 on slide 1 links to slide 3

the outcome will need to allow the image number/id (pageElement) and the slides index to be continuously editable.

Is this possible and if so, any input would be appreciated. I’m a newbie at scripting and have tried a few alternatives with no personal outcome. Here is a sample with the positions script and a few sites/options explored/looked at. Thank you

  • Selection.getPageElementRange

1 Answer 1

1

This can be done by getting the images from the slide and setting a link slide for each particular image:

For example, to set image 1 on slide [0] links to slide [1]:

SlidesApp.getActivePresentation().getSlides()[0].getImages()[0].setLinkSlide(1);

References:

Class Presentation

getImages()

setLinkSlide(slideIndex)

Sign up to request clarification or add additional context in comments.

2 Comments

Hello CMB, please excuse my really late reply but this was what I was looking for thanks.
Hello CMB, unfortunately the answer provided worked closer to the time the question was asked. Please see edited question if you have a moment. Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.