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 / August 2007

Tip: Looking for answers? Try searching our database.

LDAP binding HELP!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joanne - 23 Aug 2007 22:28 GMT
Hello, I am trying to make a connection to Active directory from within VBA.  
I set up the following:
Set ConName = CreateObject("ADODB.Connection")
Set cmd = CreateObject("ADODB.command")
Set rst = CreateObject("ADODB.RecordSet")
ConName.Provider = "ADsDSOObject"
ConName.Open
'cmd.CommandText = "<LDAP://DC=kenyon,DC=com>;(cn=JHoersch);name, ADsPath"
cmd.CommandText = "LDAP://DC=kenyon,DC=com;(cn=JHoersch);name, ADsPath"
Set rst = cmd.Execute

vName = rst.Fields("name")
MsgBox "VName is equal to " & vName

I get an error that the connection cannot be made.  I'm just guessing at the
format for this because I can't find anything on the internet that will give
me the correct format. PLEASE HELP!  I posted this earlier but have gotten no
response.  Thank you very much.
Russ - 25 Aug 2007 09:39 GMT
Joanne,

I haven't done it, but here is more internet information.
Notice one remark about references through Visual Basic
Editor-->Tools-->References-->:

<http://www.microsoft.com/technet/scriptcenter/scripts/office/excel/ofexvb05
.mspx?mfr=true>
<http://groups.google.com/group/microsoft.public.excel.programming/browse_fr
m/thread/e592207eaa0cf447/625f0f3c044b6728?lnk=st>
<http://groups.google.com/groups?hl=en&newwindow=1&safe=off&q=ldap+ingroup:v
ba&um=1&sa=N&tab=wg>

If you find a method that works, would you post it for other people's
benefit?

> Hello, I am trying to make a connection to Active directory from within VBA.
> I set up the following:
[quoted text clipped - 14 lines]
> me the correct format. PLEASE HELP!  I posted this earlier but have gotten no
> response.  Thank you very much.

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID


Rate this thread:






 
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.