hyperlinks: List the hyperlinks and text in an Office Open Document

hyperlinksR Documentation

List the hyperlinks and text in an Office Open Document

Description

This function examines the content of an Office Open document, e.g. a Word or Excel document, and finds the hyper-links within it. It returns the target of each links along with the text that is displayed for that link within the document. This is a generic function. The methods for the different types of documents are available from the corresponding package, i.e RWordXML and RExcelXML.

Usage

hyperlinks(doc, comments = FALSE, ...)

Arguments

doc

the OOXMLArchive document. This is typically an instance of WordArchive or ExcelArchive from the RWordXML or RExceXML package

comments

a logical value indicating whether to look in the content of the comments as well as the main content of the document.

...

additional parameters for methods

Value

A character vector. The values are the text that is displayed in the document. The names are the target URLs of the links.

Author(s)

Duncan Temple Lang duncan@wald.ucdavis.edu

See Also

createOODoc

Examples

   #  This shows how to get hyperlinks from a Word document, assuming
 #  RWordXML is installed.
if(require(RWordXML)) {
  d = wordDoc(system.file("SampleDocs", "hyperlinks.docx", package = "RWordXML"))
  hyperlinks(d)
  hyperlinks(d, TRUE)
}
        

duncantl/ROOXML documentation built on Nov. 23, 2023, 4:22 p.m.