I'm trying to select a newly created slide with the API call selectAsCurrentPage()
(using Google Apps Script):
var slide = SlidesApp.getActivePresentation().appendSlide(SlidesApp.PredefinedLayout.TITLE_AND_BODY);
slide.selectAsCurrentPage();
But it seems, that the selectAsCurrentPage()
doesn't work as I expected - it loads that slide into the main edit area, but the slide is not selected in the left timeline panel (it's not decorated with a grey rectangle as if I select the slide manually, instead there is a black line on top of the timeline):
So, how it is possible to select that slide also in the left timeline?
Unfortunately, in the current stage, there are no method for directly achieving the situation yet. So how about this workaround? The flow of this workaround is as follows. I think that there might be several workarounds. So please think of this as just one of them.
appendSlide()
.
By this flow, the appended slide is selected. The sample script is as follows.
var slide = SlidesApp.getActivePresentation().appendSlide(SlidesApp.PredefinedLayout.TITLE_AND_BODY);
var obj = slide.insertTextBox(""); // Added
obj.select(); // Added
obj.remove(); // Added
If this was not the result you want, I apologize.