'Importing slides from an existing PPT and add the slides to a new PPT using officer for R

Can you please provide an example of using Officer to import slides from an existing PPT, and then copying one or more of the slides into a new PPT? I did not see this at https://ardata-fr.github.io/officeverse/

I have found a backwards work-around:

my_pres <- read_pptx()
my_pres <- read_pptx(path = "one_slide.pptx") # The pptx can have any number of slides
my_pres <- add_slide(my_pres)
my_pres <- ph_with(my_pres, "Hello world", location = ph_location_type(type = "title"))
move_slide(my_pres, 1,length(my_pres))
print(my_pres, target = 'one_slide_appended.pptx')

but this limits to including slides from a single source

thanks much



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source