Set document propertiesSource:
set Word or PowerPoint document properties. These are not visible in the document but are available as metadata of the document.
Any character property can be added as a document property. It provides an easy way to insert arbitrary fields. Given the challenges that can be encountered with find-and-replace in word with officer, the use of document fields and quick text fields provides a much more robust approach to automatic document generation from R.
set_doc_properties( x, title = NULL, subject = NULL, creator = NULL, description = NULL, created = NULL, ..., values = NULL )
an rdocx or rpptx object
- title, subject, creator, description
a date object
named arguments (names are field names), each element is a single character value specifying value associated with the corresponding field name.
a named list (names are field names), each element is a single character value specifying value associated with the corresponding field name. If
valuesis provided, argument
...will be ignored.
The "last modified" and "last modified by" fields will be automatically be updated when the file is written.
Other functions for Word document informations:
x <- read_docx() x <- set_doc_properties(x, title = "title", subject = "document subject", creator = "Me me me", description = "this document is empty", created = Sys.time(), yoyo = "yok yok", glop = "pas glop") x <- doc_properties(x)