1

I've been trying to retrieve some of my e-mails in order to have them as data in R. In case it is needed, it is on a Microsoft Exchange Server.

require(RDCOMClient)
folderName = 'ElastAlerts'

#creating the outlook object

OutApp <- COMCreate('Outlook.Application')
outlookNameSpace <- OutApp$GetNameSpace("MAPI")

folder <- outlookNameSpace$Folders(1)$Folders(folderName)

But the final line shows me the following error:

<checkErrorInfo> 80020009 
No support for InterfaceSupportsErrorInfo
checkErrorInfo -2147352567
Error: Exception occurred

Thank you.

De Novo
  • 7,120
  • 1
  • 23
  • 39

2 Answers2

1

I was facing the same issue and resolved it after playing around it.

Possible solutions,

In folder <- outlookNameSpace$Folders(1)$Folders(folderName)

This instead of using "1" try using "2" or "3", it works for me.

Don't know why it is changing folder index.

Ganesh S
  • 102
  • 11
0

Make sure the specified folder exists in the store.

But the final line shows me the following error:

 folder <- outlookNameSpace$Folders(1)$Folders(folderName)

The specified line of code contains multiple property and method calls. I'd recommend breaking the chain of method calls and declaring a single method call on a separate line of code. That way you will be able to find a method or property which fails.

Note, you can iterate over all folder in the folder and find the required one by using the Name property.

Community
  • 1
  • 1
Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45