PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Help with automation Object
Help with automation Object
Débuté par Bob Stratton, 03 fév. 2006 07:18 - 1 réponse
Posté le 03 février 2006 - 07:18
Hi there,
I am trying to integrate a COM object (Redemption) to use extended MAPI funtionality.
I am finding that I am having problems getting started - never having done this before with Windev.
Below is a vbscript code example that I am trying to translate;
set Session = CreateObject("Redemption.RDOSession")
Session.Logon
set Inbox = Session.GetDefaultFolder(olFolderInbox)
for each Msg in Inbox.Items
Debug.Print(Msg.Subject)
next
So far I have;
MySession is object Automation "Redemption.RDOsession"
MyInbox is object Automation dynamic
MySession>>logon
Works ok so far. No errors.
The problem part is the following line;
"set Inbox = Session.GetDefaultFolder(olFolderInbox)"
Cannot get this to work?
I imagine that I may have a problem with the iteration part too.
Here is the declaration of the constant "olFolderInbox" and the function from
a COM browser.
%olFolderInbox = &H00000006
Member Call GetDefaultFolder<&H00000007>(in FolderType As Long<&H00000000>) As RedemptionIRDOFolder
I am feeling dumb
Any help and advice greatly appreciated
Regards
Bob
Posté le 03 février 2006 - 11:15
Now I'm not feeling so dumb!
I figured it out as follows FYI
MyREdemption is object Automation "Redemption.RDOsession"
MyInbox is object Automation dynamic
MyMsg is object Automation dynamic

MyREdemption>>logon
MyInbox = MyREdemption>>GetDefaultFolder(6)
ctMax = MyInbox>>Items>>Count
FOR ct = 1 TO ctMax
ctMax = MyInbox>>Items>>Count
s=MyInbox>>Items>>Item(ct)>>Subject
//info(ct)
Trace(s)
END
Regards
B
Hi there,
I am trying to integrate a COM object (Redemption) to use extended MAPI funtionality.
I am finding that I am having problems getting started - never having done this before with Windev.
Below is a vbscript code example that I am trying to translate;
set Session = CreateObject("Redemption.RDOSession")
Session.Logon
set Inbox = Session.GetDefaultFolder(olFolderInbox)
for each Msg in Inbox.Items
Debug.Print(Msg.Subject)
next
So far I have;
MySession is object Automation "Redemption.RDOsession"
MyInbox is object Automation dynamic
MySession>>logon
Works ok so far. No errors.
The problem part is the following line;
"set Inbox = Session.GetDefaultFolder(olFolderInbox)"
Cannot get this to work?
I imagine that I may have a problem with the iteration part too.
Here is the declaration of the constant "olFolderInbox" and the function from
a COM browser.
%olFolderInbox = &H00000006
Member Call GetDefaultFolder<&H00000007>(in FolderType As Long<&H00000000>) As RedemptionIRDOFolder
I am feeling dumb
Any help and advice greatly appreciated
Regards
Bob