I have a slide file called 'Slide A'. The file ID is simply 'A00001'.
There is another slide file called 'Slide B'. The file ID is simply 'B00002'.
I want to add the pages from Slide B into Slide A.
I have written the following code, trying to achieve this using the batchUpdate method, but it seems that instead of adding pages from Slide B, the pages from Slide A are being duplicated.
$slide_01_id = 'A00001';
$slide_02_id = 'B00002';
$slide_02 = $this->slidesService->presentations->get($slide_02_id);
$requests = [];
foreach ($slide_02->getSlides() as $slide) {
$requests[] = new \Google_Service_Slides_Request([
'duplicateObject' => [
'objectId' => $slide->getObjectId(),
]
]);
}
$batchUpdateRequest = new \Google_Service_Slides_BatchUpdatePresentationRequest();
$batchUpdateRequest->setRequests($requests);
$this->slidesService->presentations->batchUpdate($slide_01_id, $batchUpdateRequest);
I would like to know how to add pages from one slide file to another slide file.
Alternatively, if it's possible to add pages from another file, I would be fine with using Microsoft PowerPoint as well.