How to add my Outlook email signature to the COM object using RDCOMClient
Consider using Outlook's GetInspector() property. Assuming you have an auto-signature, assign a variable to capture the default body and then concatenate to your latter message:
library(RDCOMClient)
olMailItem = 0
OutApp <- COMCreate("Outlook.Application")
outMail <- OutApp$CreateItem(olMailItem)
outMail$GetInspector()
signature = outMail[["HTMLBody"]]
outMail[["Recipients"]]$Add("dest@dest.com")
outMail[["Subject"]] = "some subject"
outMail[["HTMLBody"]] = paste0('<p>some body', signature, '</p>')
outMail$Display()
outMail <- NULL
OutApp <- NULL
Full list of methods for COM objects
If you have Outlook, Excel or Word installed then you can do the following ...
- Press F11 to get to a Visual Basic Application (VBA) Integrated Development Environment (IDE).
- On the menu bar go to Tools->References to prompt the References dialog box.
- On the References dialog box, in the Available References checkbox list, page down until you find Microsoft Outlook Library (or similar), once found then check the checkbox and then press OK to confirm selection and dismiss dialog. This adds a reference to the Outlook type library to the current project.
- With the Outlook type library referenced (see step (3)) one can now press F2 to show the Object Browser dialog box.
- In the Object Browser dialog box, select the top left dropdown list which will probably say
<All Libraries>
. Change the dropdown so it says Outlook, this will scope the object browser to just the Outlook type library. - You can now browse all the objects in the Outlook type library. Select a class in the Classes pane on the left hand side and the class's methods will appear in the right hand side.
Enjoy!
Related Topics
How to Write Special Characters in Rmarkdown Latex Documents
Difference Between [] and $ Operators for Subsetting
Matrix Display Without Row and Column Names
Setting Column Width in R Shiny Datatable Does Not Work in Case of Lots of Column
Resetting Cumsum If Value Goes to Negative in R
Error While Using Install_Github | Devtools | Timeout Issue
Unscale and Uncenter Glmer Parameters
R Issue with Rounding Milliseconds
Separate a Column into 2 Columns at the Last Underscore in R
Installing "Rgl" Package in R, MAC Osx El Captian
Difference Between Backticks and Quotes in Aes Function in Ggplot
R Dplyr Join on Range of Dates
Removing Text Containing Non-English Character