Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / August 2004

Tip: Looking for answers? Try searching our database.

Redemption access to contacts in Public folder

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Phil - 19 Aug 2004 15:01 GMT
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?
Dmitry Streblechenko \(MVP\) - 19 Aug 2004 21:37 GMT
Use objFolder.Items instead of objFolder.Messages

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

> 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.
[quoted text clipped - 24 lines]
>
> Any ideas what I am doing wrong?
Phil - 20 Aug 2004 09:55 GMT
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.

> Use objFolder.Items instead of objFolder.Messages
>
[quoted text clipped - 13 lines]
> >     Dim utils As Redemption.MAPIUtils
> >     Dim objFolder As Redemption.MAPIFolder

> >     Set objSession = New MAPI.Session
> >     objSession.Logon , , , , , , "Server" & vbLf & "Mailbox"
[quoted text clipped - 13 lines]
> >
> > Any ideas what I am doing wrong?
Dmitry Streblechenko \(MVP\) - 20 Aug 2004 19:48 GMT
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

> Many thanks for your prompt reply - one hopefully quick further
> followup
[quoted text clipped - 40 lines]
> > >
> > > Any ideas what I am doing wrong?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.