PC Review


Reply
Thread Tools Rate Thread

Active Directory and VBA

 
 
Rudy Welvaert
Guest
Posts: n/a
 
      6th Sep 2003
Hello,

does anybody have experience with addressing the Active
Directory using VBA code.

Starting from an Access form, I want to be able to browse
the Active Directory and read the names of the entries to
display them in the form (and eventualy save them in a
table).

Thanks

R.
 
Reply With Quote
 
 
 
 
TC
Guest
Posts: n/a
 
      7th Sep 2003
Hi Rudy

What I know about active directory could be written around the edge of a
postage stamp with a blunt pencil.

But surely there are win32 API routines for it?

You can call win32 APIs from VBA, using the Declare statement.

I just googled on: "active directory" vba

and it got tens of thousands of hits - perhaps start there!

HTH,
TC


"Rudy Welvaert" <(E-Mail Removed)> wrote in message
news:355601c3746e$220c4580$(E-Mail Removed)...
> Hello,
>
> does anybody have experience with addressing the Active
> Directory using VBA code.
>
> Starting from an Access form, I want to be able to browse
> the Active Directory and read the names of the entries to
> display them in the form (and eventualy save them in a
> table).
>
> Thanks
>
> R.



 
Reply With Quote
 
Bill Linares
Guest
Posts: n/a
 
      7th Sep 2003
I use the file-system object:

Following code will print all the file names in current directory.

Public Sub ListCurrentDir()
Dim FileSystem As Object
Dim Location As Folder

Set FileSystem = CreateObject("Scripting.FileSystemObject")
Set db = CurrentDb
CurrentLocation = FileSystem.GetAbsolutePathName("D:")
Set Location = FileSystem.GetFolder(CurrentLocation)

Debug.Print CurrentLocation

For Each IFile In Location.Files
Debug.Print IFile.Name
Next

End Sub

IMPORTANT: I think you have to activate the reference "Scripting"


 
Reply With Quote
 
Bill Linares
Guest
Posts: n/a
 
      7th Sep 2003
by the way, if you are in C:, I think it should be:

CurrentLocation = FileSystem.GetAbsolutePathName("C:")


"Bill Linares" <(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed)...
> I use the file-system object:
>
> Following code will print all the file names in current directory.
>
> Public Sub ListCurrentDir()
> Dim FileSystem As Object
> Dim Location As Folder
>
> Set FileSystem = CreateObject("Scripting.FileSystemObject")
> Set db = CurrentDb
> CurrentLocation = FileSystem.GetAbsolutePathName("D:")
> Set Location = FileSystem.GetFolder(CurrentLocation)
>
> Debug.Print CurrentLocation
>
> For Each IFile In Location.Files
> Debug.Print IFile.Name
> Next
>
> End Sub
>
> IMPORTANT: I think you have to activate the reference "Scripting"
>
>



 
Reply With Quote
 
Rudy Welvaert
Guest
Posts: n/a
 
      9th Sep 2003
Thanks Bill,

realy appreciate, but what I realy meant was code to read
the Active Directory Service Interface ...


>-----Original Message-----
>I use the file-system object:
>
>Following code will print all the file names in current

directory.
>
>Public Sub ListCurrentDir()
> Dim FileSystem As Object
> Dim Location As Folder
>
> Set FileSystem = CreateObject

("Scripting.FileSystemObject")
> Set db = CurrentDb
> CurrentLocation = FileSystem.GetAbsolutePathName("D:")
> Set Location = FileSystem.GetFolder(CurrentLocation)
>
> Debug.Print CurrentLocation
>
> For Each IFile In Location.Files
> Debug.Print IFile.Name
> Next
>
>End Sub
>
>IMPORTANT: I think you have to activate the

reference "Scripting"
>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
question on upgrading from active directory 2000 to active directory 2003 Gary M Microsoft Windows 2000 Active Directory 2 16th Mar 2007 07:57 PM
Active Directory, Active Directory Federation Services and Microsoft Integration Identiy Server Mas Libman [MSFT] Microsoft Windows 2000 Active Directory 0 6th May 2005 10:55 PM
[Active Directory] On what ground does LDAP connect to Active Directory RTT Microsoft VB .NET 0 12th Apr 2005 04:20 PM
Arguments for 2003 Active directory versus 2000 active directory? =?Utf-8?B?c3RlcGhlbmJiYWtlcg==?= Microsoft Windows 2000 Active Directory 4 23rd Dec 2003 04:40 AM
compatibility between W2K Active Directory and W2k3 Active Directory Dani Microsoft Windows 2000 Active Directory 1 15th Sep 2003 11:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:17 PM.