프레젠테이션 업데이트의 수명 주기
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Presentation 객체의 수명 주기에는 열기, 수정, 저장의 세 가지 주요 단계가 있습니다.
프레젠테이션 열기
Slides 서비스를 사용할 때 첫 번째 단계는 프레젠테이션을 로드하는 것입니다. SlidesApp.openById() 및 SlidesApp.getActivePresentation()과 같은 메서드는 기존 Slides 프레젠테이션을 로드하고 SlidesApp.create()는 새 프레젠테이션을 만듭니다. 이 메서드는 로드된 프레젠테이션을 나타내는 Presentation 객체를 반환합니다.
프레젠테이션이 열리면 공동작업자로부터 더 이상 업데이트를 받지 않습니다. 프레젠테이션은 일반적으로 Drive에 저장된 최신 버전으로 열립니다. 하지만 스크립트가 프레젠테이션에 컨테이너 바인딩된 경우 해당 프레젠테이션은 함께 제공되는 Slides 편집기와 동일한 버전으로 로드됩니다.
프레젠테이션 수정
프레젠테이션이 열리면 스크립트가 프레젠테이션을 읽고 수정할 수 있습니다. 스크립트에서 프레젠테이션에 적용한 변경사항은 스크립트가 실행되는 동안 후속 읽기 및 수정에 반영됩니다.
변경사항 저장 중
프레젠테이션을 변경한 후 스크립트 실행이 완료되거나 Presentation.saveAndClose()가 호출되면 변경사항이 한 번에 저장됩니다. 변경사항이 저장되면 공동작업자가 변경한 것처럼 비동기적으로 사용자의 편집기에 전파됩니다.
Presentation.saveAndClose()
를 사용하여 프레젠테이션을 닫은 후 프레젠테이션 로드 방법 중 하나를 사용하여 편집을 위해 다시 열 수 있습니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-31(UTC)
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eThe Slides service allows you to open existing or create new Google Slides presentations for manipulation within Apps Script.\u003c/p\u003e\n"],["\u003cp\u003eScripts can modify presentations, with changes reflected immediately within the script but saved and propagated to the editor upon script completion or explicit save.\u003c/p\u003e\n"],["\u003cp\u003eSaving changes to a presentation is done automatically at the end of script execution or manually using \u003ccode\u003ePresentation.saveAndClose()\u003c/code\u003e, after which the presentation can be reopened.\u003c/p\u003e\n"]]],[],null,["# Life cycle of a presentation update\n\nThere are three main phases in the life cycle of a\n[Presentation](/apps-script/reference/slides/presentation) object: opening,\nediting, and saving.\n\nOpening a presentation\n----------------------\n\nWhen using the Slides Service, the first step is to load a presentation. Methods\nlike [SlidesApp.openById()](/apps-script/reference/slides/slides-app#openbyidid)\nand [SlidesApp.getActivePresentation()](/apps-script/reference/slides/slides-app#getactivepresentation)\nload an existing Slides presentation, while\n[SlidesApp.create()](/apps-script/reference/slides/slides-app#createname)\ncreates a new presentation. These methods return a\n[Presentation](/apps-script/reference/slides/presentation) object that\nrepresents the loaded presentation.\n\nOnce a presentation is open, it does not receive any further updates from\ncollaborators. Presentations are usually opened at their latest version that has\nbeen saved in Drive. However, if a script is container-bound to a presentation,\nthat presentation will be loaded at the same version as the accompanying Slides\neditor.\n\nModifying a presentation\n------------------------\n\nOnce a presentation is open, a script can read and modify it. Any changes that\nthe script makes to the presentation are reflected in subsequent reads and\nmodifications for the duration of the script execution.\n\nSaving changes\n--------------\n\nAfter making changes to a presentation, the changes are saved all at once\nwhen the script execution completes, or when [Presentation.saveAndClose()](/apps-script/reference/slides/presentation#saveandclose) is\ncalled. After changes are saved, they propagate asynchronously to the\nuser's editor, as if the changes were made by a collaborator.\n\nAfter a presentation is closed using `Presentation.saveAndClose()`, it can be\nreopened for editing using one of the presentation loading methods."]]