initialize_doc_original | R Documentation |
This function ensures a PowerPoint document ('officer::rpptx' object) is loaded. If a 'doc_original' is provided, it is directly returned. Otherwise, the function reads the presentation from the given file path.
initialize_doc_original(doc_original, doc_o)
doc_original |
An existing 'officer::rpptx' object, or 'NULL' to read from file. |
doc_o |
Path to a PowerPoint ('.pptx') file. Used only if 'doc_original' is 'NULL'. |
An 'officer::rpptx' PowerPoint object.
example <- tempfile(fileext = ".pptx")
doc <- officer::read_pptx()
doc <- officer::add_slide(doc, layout = "Title and Content")
print(doc, target = example)
doc <- initialize_doc_original(NULL, example)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.