Redemption question

G

Guest

I am using the following code on an Access form to determine if an account
code exists in a Personal Address book and to display the Outlook details
form. I have downloaded Redemption in an attempt to stop the security alerts
but can't figure out exactly how to change this code using Redemption objects
in order to stop the alerts. Any help would be appreciated.

Dim oSession As MAPI.Session
Dim oAddressEntry As MAPI.AddressEntry
Dim oAddressEntries As MAPI.AddressEntries
Dim oAddressList As MAPI.AddressList
Dim sAccount As String
Dim bFound As Boolean

Set oSession = CreateObject("MAPI.Session")
oSession.Logon "", "", False, False
Set oAddressList = oSession.AddressLists.Item("Personal Address Book")
Set oAddressEntries = oAddressList.AddressEntries

sAccount = Me.Account
For Each oAddressEntry In oAddressList.AddressEntries
If oAddressEntry.Name = sAccount Then
bFound = True
Exit For
End If
Next

If bFound Then
oAddressEntry.Details
Else
MsgBox sAccount & " not in Personal Address Book.", vbOKOnly +
vbExclamation, "EMail"
End If

Exit_Sub:
oSession.LogOff
Set oSession = Nothing
Set oAddressEntry = Nothing
Set oAddressEntries = Nothing
Set oAddressList = Nothing
 
K

Ken Slovak - [MVP - Outlook]

The better place for programming questions is a programming group, such as
microsoft.public.outlook.program_vba.

Have you tried replacing every instance of a "MAPI" declaration with
"Redemption"? If you do that and add "RDO" before all the other MAPI
declarations it looks like you only need to replace the session creation
with "Redemption.RDOSession".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top