ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Retrieving Active Directory "Full Names" (https://www.excelbanter.com/excel-programming/332687-retrieving-active-directory-full-names.html)

Ward

Retrieving Active Directory "Full Names"
 
I have a spreadsheet with 50 rows containing Active Directory usernames. I
want to create a second column containing the corresponding Full Names. That
is, cell A1 already has "msmith" and I want cell B1 to retrieve "Michael
Smith" from Active Directory. Can this be done?


--
Regards,

Ward

bhofsetz[_89_]

Retrieving Active Directory "Full Names"
 

What code are you using to retreive the usernames from th
ActiveDirectory?

This will help in answering your question

--
bhofset
-----------------------------------------------------------------------
bhofsetz's Profile: http://www.excelforum.com/member.php...fo&userid=1880
View this thread: http://www.excelforum.com/showthread.php?threadid=38176


keepITcool

Retrieving Active Directory "Full Names"
 


appears to be some coding involved..

How To Call LanMan Services from 32-bit Visual Basic Apps
http://support.microsoft.com/kb/q159498/


but THEN i thought.. WMI!!!
see http://www.codeproject.com/vbscript/ExchangeMailBox.asp



--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Ward wrote :

I have a spreadsheet with 50 rows containing Active Directory
usernames. I want to create a second column containing the
corresponding Full Names. That is, cell A1 already has "msmith" and
I want cell B1 to retrieve "Michael Smith" from Active Directory.
Can this be done?


DM Unseen

Retrieving Active Directory "Full Names"
 
There is an OLDEDB provider fro AD as well, so you can use a QueryTable
object to get a list from your AD server. You need VBA since Excel
front end does not accept an ADO string for a nornal query.

DM Unseen


keepITcool

Retrieving Active Directory "Full Names"
 

not quite true.

you cannot create a QueryTables as ADODB from UI,
as it will default to ODBC

with VBA you can create(or modify existing) QT without problems.
(maybe minor probs in xl97)

then you CAN modify the query itself from UI but you can no longer
invoke msquery.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


DM Unseen wrote :

end does not accept an ADO string for a nornal query.


DM Unseen

Retrieving Active Directory "Full Names"
 
you cannot create a QueryTables as ADODB from UI,
as it will default to ODBC


That's what I said:) QT accepts ADO connections strings, and it accepts
ADO command text (with limitations), UI wise nothing goes here so all
needs to be done in VBA. but see:
http://homepages.paradise.net.nz/~ro...eryeditor.html. I've
got my own tool but not public so this should help out

DM Unseen



All times are GMT +1. The time now is 10:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com