I want to copy the content of two slides from two pptx files into one pptx file using officer in R.
I thave started with the following code:
slide1 = read_pptx('1.pptx')
slide2 = read_pptx('2.pptx')
slide2_content = slide2 %>% slide_summary()
Now - how do I get all content from slide2 attached to slide1 and save it to a new file?
I have found a 'backwards' work-around:
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.