setProperty: Set one or more global properties of an Office Open document

View source: R/code.R

setUpdatedR Documentation

Set one or more global properties of an Office Open document

Description

These functions allow us to modify and update the properties of a document to set things like the author/creator, date modified, etc.

setProperty allows us to set general properties by name.

creator<- and setUpdated are convenience functions which set specific properties. These functions update the external archive if doc is descends from OOXMLArchive.

Usage

setUpdated(doc, date = Sys.time(), update = TRUE)
'creator<-'(doc, update = TRUE, value)
setProperty(doc, node.expression, value, update = inherits(doc, "WordArchive"))

Arguments

doc

the object identifying the document of interest. This can be an OOXMLArchive or derived object or a parsed XML document.

node.expression

xpath expression to identify the property of interest

value

the new value for the property.

update

a logical value indicating whether to update the archive or just the XML content of the document in memory

>

date

a date as a string or POSIXt value

Value

These are used for their side effect. They generally return the new value.

Author(s)

Duncan Temple Lang duncan@wald.ucdavis.edu


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