Opens an existing presentation by its file ID.
class SlidesApp method .openById()
SlidesApp is the Apps Script service.
.openById() is the method name you will see after a dot in your code.
What it does
Why it's used
- Refresh a pitch deck stored in Drive from fresh numbers.
- Batch-update slides without opening each file by hand.
Common errors
- Forgetting parentheses on openById. Write SlidesApp.openById(), not SlidesApp.openById or openById by itself.
- Skipping dots between chained calls. Each step needs a dot, like SlidesApp.openById().
- Adding spaces where they do not belong. Write SlidesApp.openById(), not SlidesApp .openById(), SlidesApp.openById (), or SlidesApp . openById().
- Wrong capitalization. Use SlidesApp and openById, not slidesapp or openbyid.
Explore
Related methods
-
.getActivePresentation()
Returns the presentation the user currently has open.
-
.create()
Creates a new blank Google Slides presentation.
-
.appendSlide()
Adds a new slide to the end of the presentation.
-
.getSlides()
Returns every slide in the presentation.
-
.getPageWidth()
Returns the width of a slide in points.
More Apps Script
Better Sheets tutorials
No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.
Related blog posts
Written guides about SlidesApp.openById().