J
Jim Spicer
Hi,
This is "old" code running some "new" Redemption functions. The
configuration is VB6, WinXP, OL2K3 and Redemption 3.3 distributable.
The code has two parts:
1. I use CDO and MAPI to get the folder names of contacts type folders.
2. Still logged onto the MAPI session, I use Outlook to enumerate the
folders. The new Redemption code functions along with the old but I get the
security alert.
I'm really new to Redemption and should probably spend more time on this
before coming to the group but I have some deadlines...
Code:
Dim oContactItems As Object
Dim oDistFolder As Object
Dim oContactItem As Object
Dim SafeContact As Object
Dim oOL As Object
Dim oNS As Object
Dim Utils As Redemption.MAPIUtils
On Error Resume Next
'this sets the list to enumerate
strFolder = Me.cbxListName.Text
Set oOL = CreateObject("outlook.application")
Set oNS = oOL.GetNamespace("MAPI")
Set SafeContact = New Redemption.SafeContactItem
Set Utils = CreateObject("Redemption.MAPIUtils")
Set oDistFolder =
oNS.GetDefaultFolder(olFolderInbox).Parent.Folders(strFolder)
Set oContactItems = oDistFolder.Items
SafeContact.Item = oContactItems 'assigns Outlook object to Redemption
object
For Each oContactItem In SafeContact.Item
If Not oContactItem.Email1Address = "" Then
If oContactItem.Email1AddressType = "EX" Then
strAddress = exAddrToSMTPAddr(objSession,
oContactItem.Email1Address)
Else
strAddress = oContactItem.Email1Address
End If
End If
Next
I've stripped out the app specific stuff.
I've tried to assign the oDistFolder to Redemption but couldn't make it
work.
Thanks for any help,
Jim Spicer
This is "old" code running some "new" Redemption functions. The
configuration is VB6, WinXP, OL2K3 and Redemption 3.3 distributable.
The code has two parts:
1. I use CDO and MAPI to get the folder names of contacts type folders.
2. Still logged onto the MAPI session, I use Outlook to enumerate the
folders. The new Redemption code functions along with the old but I get the
security alert.
I'm really new to Redemption and should probably spend more time on this
before coming to the group but I have some deadlines...
Code:
Dim oContactItems As Object
Dim oDistFolder As Object
Dim oContactItem As Object
Dim SafeContact As Object
Dim oOL As Object
Dim oNS As Object
Dim Utils As Redemption.MAPIUtils
On Error Resume Next
'this sets the list to enumerate
strFolder = Me.cbxListName.Text
Set oOL = CreateObject("outlook.application")
Set oNS = oOL.GetNamespace("MAPI")
Set SafeContact = New Redemption.SafeContactItem
Set Utils = CreateObject("Redemption.MAPIUtils")
Set oDistFolder =
oNS.GetDefaultFolder(olFolderInbox).Parent.Folders(strFolder)
Set oContactItems = oDistFolder.Items
SafeContact.Item = oContactItems 'assigns Outlook object to Redemption
object
For Each oContactItem In SafeContact.Item
If Not oContactItem.Email1Address = "" Then
If oContactItem.Email1AddressType = "EX" Then
strAddress = exAddrToSMTPAddr(objSession,
oContactItem.Email1Address)
Else
strAddress = oContactItem.Email1Address
End If
End If
Next
I've stripped out the app specific stuff.
I've tried to assign the oDistFolder to Redemption but couldn't make it
work.
Thanks for any help,
Jim Spicer