Page 1 of 1

Read email from subfolder

Posted: Wed Jun 12, 2019 8:20 am
by Marc Vanzegbroeck
Hi,

I can read the mails from outlook from the inbox with

Code: Select all

oOL := TOleAuto():New( "Outlook.Application" )

oNameSpace = oOL:Get( "GetNameSpace", "MAPI" )
oInbox = oNameSpace:Get( "GetDefaultFolder", "6" ) // 6 = Inbox-Folder
But how can I read it from a subfolder from the inbox?

Re: Read email from subfolder

Posted: Wed Jun 12, 2019 10:54 am
by Marc Vanzegbroeck
I found it, the problem isthat I have multiple accounts in outlook, and it was searching in the wrong account.
How can I define the Get( "GetDefaultFolder", "6" ) from a specific account?

Thanks,