0

Hi I have linked objects in Google slides that come from sheets and I want it to automatically update the objects when a change is made in sheets. There are countless websites saying it's easy: tools > linked objects > update all. But this is not automatically done. I really need it to automatically update. They say it can be done with scripts but haven't found a script that works.

Here's the latest script that I was found but still, it's not updating automatically

function refreshChartsOnChange(){
    var getSlides = SlidesApp.openById('SLIDE-ID').getSlides();

    for (var i = 0; i < getSlides.length; i++) {
        var slide = getSlides[i];
        var sheetCharts = slide.getSheetsCharts();

    for (var j = 0; j < sheetCharts.length; j++) {
        var sheetChart= sheetCharts[j];
        sheetChart.refresh();
    }
}

I really need this and PLEASE do not tell me to manually go through the menu and press the 'update all' as this is useless to me for my needs. Thanks.

  • I haven't used slides much. Have you tried attaching your function to an installable onEdit() trigger for the Spreadsheet that contains the source objects? You may wish to add more logic so that it only triggers when the appropriate sheets are edited – Cooper Jun 25 '23 at 18:17
  • Does this answer your question? [Apps script newbie question: Can you automate the Tools > Linked objects > Update all command?](https://stackoverflow.com/questions/76497713/apps-script-newbie-question-can-you-automate-the-tools-linked-objects-updat) – Tedinoz Jun 27 '23 at 12:55

0 Answers0