Relative Content

Tag Archive for google-apps-scriptgoogle-slides

Replace placeholders within shape groups Google slide using appscript

function copyShapes(copyCount) { const presentation = SlidesApp.getActivePresentation(); const slide = presentation.getSlides()[0]; let group = slide.getGroups()[0]; const xIncrement = 10; const yIncrement = 5.5; const initialX = 0.25; const initialY = 1; const maxCopiesPerPage = 10; for (let i = 0; i < copyCount; i++) { if (i % maxCopiesPerPage === 0) { if (i > […]

Is there a work around to pass google slide properties service data to a copy of the document

I’m new to using the properties service so I’m hoping my understanding is wrong!
I’ve tried using the document properties service to save a key value pair to a document.
This works – but when I make copies of the document the key value pair is not saved in the new copies of the document, which is what I’m trying to achieve.
Is there any way to code things so the properties data is also copied as each new copy of the document is created?
I can always resort to storing the data in a hidden text box on the slide, but I’m trying to avoid that.

Apps script variable not being recognised

There’s clearly some obvious error(s) on my part, but I just can’t seem to figure out what I’ve done wrong.
The variable called check in the code below is not being recognised in the If statement, and the If statement code following the if statement is being run regardless of the outcome of the if statement – any ideas what I’m doing wrong?