Redemption access to contacts in Public folder

P

Phil

I am trying to iterate through the contacts of a public folder to get
the e-mail addresses using Redeption but get the security pop-up.

A cut down version of the code I am using is below

Dim objItem As MAPI.Message
Dim objSession As MAPI.Session
Dim objNormFolder As MAPI.Folder
Dim utils As Redemption.MAPIUtils
Dim objFolder As Redemption.MAPIFolder

Set objSession = New MAPI.Session
objSession.Logon , , , , , , "Server" & vbLf & "Mailbox"

Set utils = CreateObject("Redemption.MAPIUtils")
utils.MAPIOBJECT = objSession.MAPIOBJECT

Set objNormFolder =
objSession.InfoStores(1).RootFolder.Folders.Item(2).Folders.Item(8)

Set objFolder = New Redemption.MAPIFolder
objFolder.Item = objNormFolder

Set objItem = objFolder.Messages(1) <==== Security pop-up here

The problem is that the last line results in the security pop-up.

Any ideas what I am doing wrong?
 
P

Phil

Many thanks for your prompt reply - one hopefully quick further
followup

I now wish to extract e-mail addresses (type and value). I assume
that I need to use the Fields member but can't work out what prop tag
to use.

Phil.
 
D

Dmitry Streblechenko \(MVP\)

Look at the message using OutlookSpy (click IMessage button). Select the
property that you are after and note the GUID and id.
You can then call MessageItem.GetIDsFromNames() passing the GUId and id,
"or" the returned tag with the correct prop type (e.g. PT_STRING8 = 0x1E).
After that you can use it in MessageItem.Fields(). See
http://www.dimastr.com/redemption/utils.htm#xmapi and scroll to "Named
Properties".

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

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

Similar Threads


Top