Mar 11 2021 07:04 AM - edited Mar 12 2021 08:14 AM
I'm trying to use R to load my emails from Outlook 365. Yesterday I tried this:
library(RDCOMClient)
outlook_app <- COMCreate("Outlook.Application", existing = FALSE)
outlookNameSpace <- outlook_app$GetNameSpace("MAPI")
folder <- outlookNameSpace$GetDefaultFolder(6)
emails <- folder$Items
and it worked fine. When I ran the following code:
emails(1)[['Subject']]
I could see the subject of the last email on my Inbox. Great!
However, I couldn't get any updates from that point. If I run the same code today, I get exactly the same emails than yesterday, eventhough I have new emails on my Inbox.
I tryed with and without the existing = FALSE option in COMCreate function, but with no success.
What I'm doing wrong? How can update the data with the new emails?
By the way, is there any good documentation or tutorial about using RDCOMClient with Outlook? I still can't get the logic of this library.
Dec 18 2021 08:36 AM
@celinafregoso99 did you ever find an answer for this issue? My RDCOMClient started exhibiting the same behavior this past week. I am unable to find anything newer than 12/9/2021.