ph_hyperlink
From officer v0.3.4
by David Gohel
hyperlink a placeholder
add hyperlink to a placeholder in the current slide.
Usage
ph_hyperlink(x, type = NULL, id_chr = NULL, ph_label = NULL, href)
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
.- ph_label
label associated to the placeholder. Use column
ph_label
of result returned byslide_summary
. This should be used instead of usingtype
andid_chr
.- href
hyperlink (do not forget http or https prefix)
Examples
# 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")
slide_summary(doc) # read column ph_label here
doc <- ph_hyperlink(x = doc, ph_label = "Title 1",
href = "https://cran.r-project.org")
print(doc, target = fileout )
# }
Community examples
Looks like there are no examples yet.