Solved

get all the contact names from address books

Posted on 2009-04-02
6
178 Views
Last Modified: 2012-05-06
Hi,

Could anyone please tell me whow could I get the all person's names from address book and display it in combobox in Add-in form,?

Thanks.
0
Comment
Question by:deshaw
  • 3
  • 3
6 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 24047948
Hi, deshaw.

Which address book?
0
 
LVL 1

Author Comment

by:deshaw
ID: 24047957
From Global Address List.
Thanks.
0
 
LVL 1

Author Comment

by:deshaw
ID: 24047978
basically i need the list of users in attached dialog.  i think you got it now.
allusers.JPG
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 24048005
Use the code from this question http://www.experts-exchange.com/Software/Office_Productivity/Groupware/Outlook/Q_24280084.html with a couple of slight modifications.  

1.  First, change the SELECT statement on line 5 so the command retrieves all users not just the one with the account name 'jdoe'.
2.  Remove line 12 and replace it with commands to populate your pulldown control
Sub GetContactInfo()
    Set rsDetails = Wscript.CreateObject("ADODB.Recordset")
    rsDetails.ActiveConnection = "Provider=ADSDSOObject"
    'Replace DomainName on the following line with the name of your domain and jdoe with the account name you want to search for'
    rsDetails.Source = "SELECT ADsPath, displayName, Company, Department, Division FROM 'LDAP://DomainName' WHERE objectClass='user' AND objectCategory='Person'"
    rsDetails.CursorType = 0
    rsDetails.CursorLocation = 2
    rsDetails.LockType = 1
    rsDetails.Open()
    If Not rsDetails.EOF Then
        With rsDetails
            'Commands to populate your controls go here'
        End With
    End If
    rsDetails.Close
    Set rsDetails = Nothing
End Sub

Open in new window

0
 
LVL 1

Author Closing Comment

by:deshaw
ID: 31565700
thanks so simple. :)
0
 
LVL 76

Expert Comment

by:David Lee
ID: 24048076
You're welcome.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now