Redemption Contact Question

M

Mike Vandemore

I am trying to use the "Redemption.SafeContactItem" object to read the
email address properties of a contact item. (In order to avoid the
Outlook object nag message). I have searched for an example but can't
seem to find one.

Here is what I tried:

Dim oItem As Object
Dim oContactItem As Object
Dim oMAPIUtils As Object

Set oItem = CreateObject("Redemption.SafeContactItem")
Set oMAPIUtils = CreateObject("Redemption.MAPIUtils")
Set oContactItem = oMAPIUtils.GetItemFromID( sItemID, sStoreID)
Set oItem = oContactItem

msgbox "Email " & oItem.Email1DisplayName & " is " &
oItem.Email1Address

This causes a "Object doesn't support this property or method" error.

Any one have an example of the correct way to do this?
 
K

Ken Slovak - [MVP - Outlook]

Using MAPIUtils.GetItemFromID returns a Redemption.MessageItem, not a
contact item.

Dim oItem As Object
Dim oContactItem As Outlook.ContactItem
Dim oOL As Outlook.Application

Set oOL = CreateObject("Outlook.Application")
Set oItem = CreateObject("Redemption.SafeContactItem")
Set oContactItem = oOL.Session.GetItemFromID( sItemID, sStoreID)
oItem.Item = oContactItem

The Redemption Web site has some examples of this and other Redemption
methods.
 

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