update_docx_title: Update the title property of a .docx file created with the...

View source: R/functions.R

update_docx_titleR Documentation

Update the title property of a .docx file created with the 'officer' package

Description

This function exports the document as a temporary .docx file, creates a temporary .vbs file to update the document's title property and save, runs the .vbs file in command prompt, overrides x using the 'read_docx()' function of the 'officer' package, deletes the temporary files, and returns the updated .docx file.

Usage

update_docx_title(x, title = NULL)

Arguments

x

document created using 'read_docx()' function from 'officer' package

title

string the document's title property is to be set to

Examples

doc <- read_docx()
doc <- update_docx_title(doc, "Example title")

joshmire/officerWinTools documentation built on July 5, 2023, 4:27 a.m.