Open a .msg in the current Outlook session. First, copies it to a temporary location, to avoid locking it.

open_msg(ol_app, path_msg, show_message = TRUE)

Arguments

ol_app

An object that represents an Outlook application instance (class: class `COMIDispatch.`)

path_msg

a path to a '.msg' or '.eml' file (not checked for format)

show_message

if TRUE, show the message for editing after creation

Value

a COM object that binds to an e-mail window (`'Outlook.MailItem'`)

Examples

if (FALSE) { # Path to a sample .msg file f <- system.file('data/sample.msg', package = 'outlookMailer') con <- connect_outlook() msg <- open_msg(con, path_msg = f, show_message = TRUE) }