print.rpptx: Write a 'PowerPoint' file.

View source: R/read_pptx.R

print.rpptxR Documentation

Write a 'PowerPoint' file.

Description

Create a 'PowerPoint' file from an rpptx object (created by read_pptx()).

Usage

## S3 method for class 'rpptx'
print(x, target = NULL, preview = FALSE, ...)

Arguments

x

an rpptx object.

target

path to the .pptx file to write. If target is NULL (default), the rpptx object is printed to the console.

preview

Save x to a temporary file and open it (default FALSE).

...

unused.

Value

If preview is TRUE, returns the temp file path invisibly.

See Also

read_pptx()

Examples

# write an rpptx object to a .pptx file ----
file <- tempfile(fileext = ".pptx")
x <- read_pptx() # empty presentation, has no slides yet
print(x, target = file)

# preview mode: save to temp file and open locally ----
## Not run: 
print(x, preview = TRUE)

## End(Not run)

officer documentation built on Sept. 9, 2025, 5:30 p.m.