officer (version 0.1.8)

ph_remove: remove shape

Description

remove a shape in a slide

Usage

ph_remove(x, type = NULL, id_chr = NULL)

Arguments

x

a pptx device

type

placeholder type

id_chr

placeholder id (a string). This is to be used when a placeholder type is not unique in the current slide, e.g. two placeholders with type 'body'. Values can be read from slide_summary.

Examples

Run this code
# NOT RUN {
fileout <- tempfile(fileext = ".pptx")
doc <- read_pptx()
doc <- add_slide(doc, layout = "Title and Content", master = "Office Theme")
doc <- ph_with_text(x = doc, type = "title", str = "Un titre")
slide_summary(doc) # read column id here
doc <- ph_remove(x = doc, type = "title", id_chr = "2")

print(doc, target = fileout )
# }

Run the code above in your browser using DataCamp Workspace