Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(magrittr)
- def_text <- fp_text(color = "black", italic = FALSE, font.size = 20)
- lastPhId <- function(presentation) {
- index = presentation$cursor
- x <- slide_summary(presentation, index = index)
- x <- x[x$type == "body", ]
- max(as.numeric(x$id))
- }
- TITLE = fpar(ftext("My Title", prop = def_text))
- TITLE <- update(TITLE, fp_p = fp_par(text.align = "left"))
- doc <- read_pptx()
- doc %<>% add_slide(layout = "Title and Content", master = "Office Theme")
- doc %<>% ph_empty_at(left = 3, top = 3, height = 1, width = 4, bg = "yellow")
- doc %<>% ph_add_fpar(value = TITLE, id_chr = lastPhId(doc))
- print(doc, target = "ph_add_fpar.pptx")
- system("cmd.exe", input = "ph_add_fpar.pptx")
Add Comment
Please, Sign In to add comment