Hi -
John elsewhere in this forum has pointed me to an external library which looks like it could be useful for what I’m trying to do. Unfortunately I really don’t know how to go about using it.
The external library in question is Redemption, http://www.dimastr.com/redemption/rdo_introduction.htm
I get a bunch of DLLs, which I can register on Windows using regsvr32, but after that I’m baffled - how do I tell Xojo that they’re there, so I can use them in a method? Also, how do I start translating the sample code there to RealBasic (or XojoCode, or whatever it’s called now…)?
Thanks in advance for any help on this one; very much appreciated.
H
I’m cleverer than I thought.
Once you’ve downloaded Redemption, and registered it using regsvr32 as described in the read me file, code such as this will work.
[code]dim session, inbox, message as OLEObject
dim i as integer
session = New OLEObject(“Redemption.RDOSession”)
session.Logon
inbox = Session.GetDefaultFolder(6)
for i =1 to inbox.Items.Count
MsgBox(inbox.Items(i).Subject)
next[/code]
Posting here so when I come back to it in six months’ time I’ll be able to find it
Further info for anyone coming here to find it.
dim session, mailbox, message, stores as OLEObject
dim i as integer
session = New OLEObject(“Redemption.RDOSession”)
session.Logon
stores = Session.Stores
// stores allow you to have more than one mailbox within Outlook - e.g. different accounts. You can find what’s in them by looping through their folders. The root folder is found thus:
// for i = 1 to stores.count
// rootfolder = stores.item(i).ipmrootfolder
// next
// You can then do stuff with rootfolder.folders.count, looping through them and referring to root folder.folders(i).
// Each folder has a unique ID, rootfolder.folders(i).entryid
inbox = Session.GetDefaultFolder(6)
// or, alternatively, inbox = rootfolder.folders(i) if you don’t want to use the default.
for i =1 to inbox.Items.Count
MsgBox(inbox.Items(i).Subject)
next