You will either need to use Extended MAPI (C++ or Delphi only), CDO 1.21
(not installed by default, use AddressEntry.Fields[]) or use Redemption
(RDOAddresEntry - see
http://www.dimastr.com/redemption/rd...dressentry.htm)
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Dugutigi" <(E-Mail Removed)> wrote in message
news:6B0AFA99-C01E-4920-86D9-(E-Mail Removed)...
>I have code that reads names from a local Distribution List and looks up
>the
> name in the Global Address List. The purpose is to retrieve a few of the
> details about the user that appear in the properties dialog box ... such
> as
> Street Address, City and State.
>
> My problem is that I only have Outlook 2003 which apparently does not have
> the GetExchangeUser object. How can I retrieve these pieces of
> information
> without the GetExchangeUser object?
>
> Here is my code so far ... which works as long as I have manually selected
> my local Distribution List. Thanks in advance for any help.
>
> Dim olkDL As Outlook.DistListItem
> Dim olkEntry As Outlook.Recipient
> Dim olkContact As Outlook.ContactItem
> Dim intCount As Integer
> Dim strAddress As String
> Dim strName As String
>
> Dim oApp As Outlook.Application
> Dim oNS As Outlook.NameSpace
> Dim oALs As Outlook.AddressLists
> Dim oGal As Outlook.AddressList
> Dim oEntries As Outlook.AddressEntries
> Dim oEntry As Outlook.AddressEntry
>
> Dim x As Long
>
> Set oApp = Outlook.Application
> ' Get the MAPI namespace.
> Set oNS = oApp.Session
> ' Get the Global Address List.
> Set oALs = oNS.AddressLists
> Set oGal = oALs.Item("Global Address List")
> ' Get all the entries.
> Set oEntries = oGal.AddressEntries
>
> ' Get the first user.
> Set oEntry = oEntries.GetFirst()
>
> 'Get the currently selected distribution list'
> Set olkDL = Application.ActiveExplorer.Selection(1)
> For intCount = 1 To olkDL.MemberCount
> Set olkEntry = olkDL.GetMember(intCount)
> For x = 1 To oEntries.Count
> strName = olkEntry.AddressEntry.Name
> If oEntry.Name = strName Then
> Debug.Print oEntry.Name & ";" & oEntry.Address
> GoTo NextIntCount
> End If
> Set oEntry = oEntries.GetNext
> Next x
>
> NextIntCount:
> Next intCount
>
>
> Set olkEntry = Nothing
> Set olkDL = Nothing