Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2007

Tip: Looking for answers? Try searching our database.

ADSystemInfo

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Senad Isanovic - 02 Mar 2007 15:15 GMT
Trying to find some info about how to displat all users (members) of a
certain AD group.. Found the code below that gets info about the user that
is logged on the machine but need some help about how to display all users.
(their username, firstname, lastname, title, phone and email) Thanks!

Dim oGroup As Object
Dim oAdSys As Object
Set oAdSys = CreateObject("ADSystemInfo")
Set oUser = GetObject("LDAP://" & oAdSys.username)
bInitialized = True
Shauna Kelly - 03 Mar 2007 11:08 GMT
Hi Senad

Have a look at this page
http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx?mfr=true
in the section "Active Directory".

The code on that site is VB Script, so you'll have to translate it slightly
into VBA.

Hope this helps.

Shauna Kelly.  Microsoft MVP.
http://www.shaunakelly.com/word

> Trying to find some info about how to displat all users (members) of a
> certain AD group.. Found the code below that gets info about the user that
[quoted text clipped - 7 lines]
> Set oUser = GetObject("LDAP://" & oAdSys.username)
> bInitialized = True
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.