open_file: Opens a file locally

View source: R/utils.R

open_fileR Documentation

Opens a file locally

Description

Opening a file locally requires a compatible application to be installed (e.g., MS Office or LibreOffice for .pptx or .docx files).

Usage

open_file(path)

Arguments

path

File path.

Details

NB: Function is a small wrapper around utils::browseURL() to have a more suitable function name.

Examples

x <- read_pptx()
x <- add_slide(x, "Title Slide", ctrTitle = "My Title")
file <- print(x, tempfile(fileext = ".pptx"))
## Not run: 
open_file(file)
## End(Not run)

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