Last chance! 50% off unlimited learning
Sale ends in
add hyperlink to a placeholder in the current slide.
ph_hyperlink(x, type = NULL, id_chr = NULL, href)
a pptx device
placeholder type
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
.
hyperlink (do not forget prefix http or https)
# 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 1")
doc <- add_slide(doc, layout = "Title and Content", master = "Office Theme")
doc <- ph_with_text(x = doc, type = "title", str = "Un titre 2")
doc <- on_slide(doc, 1)
slide_summary(doc) # read column id here
doc <- ph_hyperlink(x = doc, id_chr = "2",
href = "https://cran.r-project.org")
print(doc, target = fileout )
# }
Run the code above in your browser using DataLab