trying to move data from sheets to auto fill a template in Google Slides. I've gotten it to work, however, I want it to keep the colors of the font of the shapes. The shapes are just the font with color. Any thoughts on what I need to add? (First timer here :)
My code is below:
function createOneSlidePerRow() {
let masterDeckID = "deck ID";
let masterSheetID= "sheet ID"
let deck = SlidesApp.openById(masterDeckID);
let slides = deck.getSlides();
let masterSlide = slides[1];
let dataRange = SpreadsheetApp.openById(masterSheetID).getDataRange();
let sheetContents = dataRange.getValues();
let header = sheetContents.shift();
let updatedContents = [];
sheetContents.reverse();
sheetContents.forEach(function (row) {
let slide = masterSlide.duplicate();
slide.replaceAllText("{{full_name}}", row[0]);
slide.replaceAllText("{{symbol_1}}", row[1]);
slide.replaceAllText("{{symbol_2}}", row[2]);
slide.replaceAllText("{{symbol_3}}", row[3]);
}
I found this but I have no idea how to adapt: Google Apps Script: Replace all text in slide table with values and formatting from sheets
From your updated question, how about the following modification?
Modified script:
Before you use this script, please set
masterDeckIDandmasterSheetID.References:
Added:
From your following reply,
Will this script bring your expected result?