چرخه حیات به‌روزرسانی ارائه

سه مرحله اصلی در چرخه حیات یک شیء ارائه وجود دارد: باز کردن، ویرایش و ذخیره.

باز کردن یک ارائه

When using the Slides Service, the first step is to load a presentation. Methods like SlidesApp.openById() and SlidesApp.getActivePresentation() load an existing Slides presentation, while SlidesApp.create() creates a new presentation. These methods return a Presentation object that represents the loaded presentation.

Once a presentation is open, it does not receive any further updates from collaborators. Presentations are usually opened at their latest saved version in Google Drive. However, if a script is container-bound to a presentation, that presentation is loaded at the same version as the accompanying Slides editor.

اصلاح یک ارائه

After a presentation is open, a script can read and modify it. Any changes that the script makes to the presentation are reflected in subsequent reads and modifications for the duration of the script execution.

ذخیره تغییرات

After making changes to a presentation, the changes are saved all at once when the script execution completes, or when Presentation.saveAndClose() is called. After changes are saved, they propagate asynchronously to the user's editor, as if the changes were made by a collaborator.

پس از اینکه یک ارائه با استفاده از Presentation.saveAndClose() بسته شد، می‌توان آن را برای ویرایش با استفاده از یکی از روش‌های بارگذاری ارائه، مجدداً باز کرد.