tmp <- tempfile(fileext = ".pptx")
doc <- officer::read_pptx()
print(doc, target = tmp)
my_page_list <- list(
list(type = "title", to_page = 1, study_id = "My Project"),
list(type = "section", to_page = 2, section_title = "Introduction"),
list(type = "title", to_page = 3, study_id = "Mid-Term Review"),
list(type = "section", to_page = 4, section_title = "Key Findings")
)
# Append all slides using the dynamic page_list
doc <- append_all_slides(
doc_o = tmp,
page_list = my_page_list,
save_file = TRUE
)
Run the code above in your browser using DataLab