I just put this under a Command1.Click event for
testing.

    Dim con As ADODB.Connection
    Dim rs As ADODB.Recordset
    Dim i As Long
    Dim j As Integer
    Set con = New ADODB.Connection
    Set rs = New ADODB.Recordset

    With con
        .ConnectionString =
"Provider=Microsoft.JET.OLEDB.4.0;" & _
                            "Exchange 4.0;" & _
                            "MAPILEVEL=Outlook Address
Book\;" & _
                            "PROFILE=fire staffing;" &
_
                            "TABLETYPE=1;" & _
                           
"DATABASE=//clovis-014.cityofclovis.net" 'You will
need to change this!
        .Open
        
    End With

    With rs
        Set .ActiveConnection = con
        .CursorType = adOpenStatic
        .LockType = adLockReadOnly
        .Open "Select * from [fire dept pagers II]"
        .MoveFirst
        j = 0
        
        Do While Not rs.EOF
            j = j + 1
'            For i = 0 To rs.Fields.Count - 1
'                Debug.Print rs(i).Name + vbTab +
Format(rs(i).Value)
'            Next i
            Debug.Print rs.Fields("First").Value & ",
" & rs.Fields("Last") & _
            " " & rs.Fields("e-mail address").Value
            rs.MoveNext
        Loop
        
        .Close
    End With
    Debug.Print "number of records" & " - " & j; ""
    Set rs = Nothing

    con.Close
    Set rs = Nothing


--- "m.a mehran" <[EMAIL PROTECTED]> wrote:

> hi Darrell 
> can you kindly explain how did you do it?
> Regards
> Mehran 
> 
> --- Darrell Adams <[EMAIL PROTECTED]> wrote:
> 
> > I'm using ADODB to connect to the Outlook address
> > book
> > on the exchange server. I can display the
> individual
> > names, pager numbers and e-mail addresses but the
> > distribution list are not there. 
> > 
> > How to I retrieve the distribution list and the
> > underlying names and addresses I want?
> > 
> > I want to be able to select the distribution list
> > and
> > the message goes to everyone in the list.
> > 
> > 
> >             
> > __________________________________ 
> > Yahoo! Mail - PC Magazine Editors' Choice 2005 
> > http://mail.yahoo.com
> > 
> 
> 
> 
>               
> __________________________________ 
> Yahoo! Mail - PC Magazine Editors' Choice 2005 
> http://mail.yahoo.com
> 
> 
> 
> 



        
                
______________________________________________________ 
Yahoo! for Good 
Donate to the Hurricane Katrina relief effort. 
http://store.yahoo.com/redcross-donate3/ 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/k7folB/TM
--------------------------------------------------------------------~-> 


'// =======================================================
    Rules : http://ReliableAnswers.com/List/Rules.asp
    Home  : http://groups.yahoo.com/group/vbHelp/
    =======================================================
    Post  : [email protected]
    Join  : [EMAIL PROTECTED]
    Leave : [EMAIL PROTECTED]
'// =======================================================
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/vbhelp/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to