tmp <- tempfile(fileext = ".pptx")
doc <- officer::read_pptx()
doc <- officer::add_slide(doc, layout = "Title Slide", master = "Office Theme")
print(doc, target = tmp)
doc <- officer::read_pptx(tmp)
# Call postprocessing_doc to save a modified version of doc
postprocessing_doc(doc, TRUE, tmp, type = "final")
Run the code above in your browser using DataLab