Solved

get all the contact names from address books

Posted on 2009-04-02
6
173 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

My experience with Windows 10 over a one year period and suggestions for smooth operation
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 …
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

708 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