Solved

get all the contact names from address books

Posted on 2009-04-02
6
176 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Are you unable to connect or configure Hotmail email account in Microsoft Outlook 2010, 2007? Or Outlook.com emails are not downloading to Outlook? Lets’ see the problem and resolve Outlook Connector error syncing folder hierarchy (0x8004102A).
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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 …

932 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

12 Experts available now in Live!

Get 1:1 Help Now