ph_hyperlink
From officer v0.3.15
by David Gohel
hyperlink a placeholder
add hyperlink to a placeholder in the current slide.
Usage
ph_hyperlink(x, type = "body", id = 1, id_chr = NULL, ph_label = NULL, href)
Arguments
- x
an rpptx object
- type
placeholder type
- id
placeholder index (integer) for a duplicated type. This is to be used when a placeholder type is not unique in the layout of the current slide, e.g. two placeholders with type 'body'. To add onto the first, use
id = 1
andid = 2
for the second one. Values can be read fromslide_summary
.- id_chr
deprecated.
- ph_label
label associated to the placeholder. Use column
ph_label
of result returned byslide_summary
.- href
hyperlink (do not forget http or https prefix)
See Also
Other functions for placeholders manipulation:
ph_remove()
,
ph_slidelink()
Examples
# NOT RUN {
fileout <- tempfile(fileext = ".pptx")
loc_manual <- ph_location(bg = "red", newlabel= "mytitle")
doc <- read_pptx()
doc <- add_slide(doc)
doc <- ph_with(x = doc, "Un titre 1", location = loc_manual)
slide_summary(doc) # read column ph_label here
doc <- ph_hyperlink(x = doc, ph_label = "mytitle",
href = "https://cran.r-project.org")
print(doc, target = fileout )
# }
Community examples
Looks like there are no examples yet.