Life cycle of a presentation update Stay organized with collections Save and categorize content based on your preferences.
Page Summary
A Presentation object in Slides Service has three main phases: opening, editing, and saving.
Presentations can be opened using methods like
openById(),getActivePresentation(), or created usingcreate().Changes made to an open presentation are reflected during script execution but not to collaborators until saved.
Changes to a presentation are saved automatically when the script finishes or manually by calling
saveAndClose().
There are three main phases in the life cycle of aPresentation object: opening,editing, and saving.
Opening a presentation
When using the Slides Service, the first step is to load a presentation. MethodslikeSlidesApp.openById()andSlidesApp.getActivePresentation()load an existing Slides presentation, whileSlidesApp.create()creates a new presentation. These methods return aPresentation object thatrepresents the loaded presentation.
Once a presentation is open, it does not receive any further updates fromcollaborators. Presentations are usually opened at their latest version that hasbeen saved in Drive. However, if a script is container-bound to a presentation,that presentation will be loaded at the same version as the accompanying Slideseditor.
Modifying a presentation
Once a presentation is open, a script can read and modify it. Any changes thatthe script makes to the presentation are reflected in subsequent reads andmodifications for the duration of the script execution.
Saving changes
After making changes to a presentation, the changes are saved all at oncewhen the script execution completes, or whenPresentation.saveAndClose() iscalled. After changes are saved, they propagate asynchronously to theuser's editor, as if the changes were made by a collaborator.
After a presentation is closed usingPresentation.saveAndClose(), it can bereopened for editing using one of the presentation loading methods.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-11 UTC.