Forum Discussion

celinafregoso99's avatar
celinafregoso99
Copper Contributor
Mar 11, 2021

Can't receive new emails with RDCOMClient

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.

Thanks!

  • stuck1485's avatar
    stuck1485
    Copper Contributor

    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.

Resources