473,411 Members | 2,019 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Active Directory Usage in VBA

NeoPa
32,556 Expert Mod 16PB
Having come across this from ADezii's code in having access send an email, email automation, I felt this was something I'd benefit from progressing with.

I have determined that the CreateObject() function appears to be from basic VBA, though I'm not sure where I would find information as to which string values could be used as the [Application.]Class parameter.

I'm interested in finding where the roots may be found for such AD related objects, and where the Meta-data for them may be found.
Expand|Select|Wrap|Line Numbers
  1. Dim objAD As Object
  2. Dim objUser As Object
  3.  
  4. Set objAD = CreateObject("ADSystemInfo")
  5. Set objUser = GetObject("LDAP://" & objAD.UserName)
Jun 19 '09 #1
2 8887
ADezii
8,834 Expert 8TB
@NeoPa
Hello NeoPa, isn't it just as simple as Opening the Object Browser, selecting the appropriate Library, see what Classes are contained within the Library, select a Class, then see what Properties/Methods an Instance of the Class (Object) would expose? In the specific case you mention, the ActiveDs Library contains the ADSystemInfo Class. UserName would be a Property exposed by an Instance of this Class, namely: ActiveDs.ADSystemInfo.UserName. Am I off track here in my thinking?
Jun 20 '09 #2
NeoPa
32,556 Expert Mod 16PB
As with most things it depends heavily on having a starting point.

Personally I'm not unfamiliar with the object browser, but I wouldn't have known where to start looking for the appropriate library had you not introduced it in your post.

It has also been my experience that finding what you need in a library often depends on what you already know about it. I was told about the TimeOut property recently which I'd searched high & low for before. It was not a parameter to the .Execute method as I would have expected (I believe it was you who pointed me in the right direction eventually).

In short, you'r pretty well on the button, but if there is one element where you may be a little awry it is in assuming everything is straightforward, even for those who don't already know the answers.
Jun 22 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Chloe Crowder | last post by:
Hi I've created a stored procedure (see below) which accesses the Active Directory and SQL server to get "real names" back. When I run the stored procedure in Query Analyzer it returns the...
0
by: microsoft | last post by:
Hi People, when I try to modify an active directory user programatically, I receive the following exception: The server is unwilling to process the request Reading the microsoft web site, I...
9
by: Mario Rodriguez | last post by:
Hi people. I have a problem adding users to Win2003 active directory programatically. When I execute my app throws the following exception: .................The specified directory service...
1
by: Andrew | last post by:
Hey all, Working on revamping our Intranet here and making use of the LDPA, Active Directory, Directory Services, etc. that .Net provides. I am still fairly new on this subject, so the problem...
6
by: Leo_Surf | last post by:
Hello, I need your help adding user in Active Directory from ASP.net website. Could any one provide me the complete code for the html page. As this is my curriculam project and I dont have any...
1
by: tangus via DotNetMonster.com | last post by:
Hello all, I'm really struggling with getting some Active Directory code to work in ASP.NET. Can you please provide assistance? I am executing the following code: Dim enTry As DirectoryEntry =...
10
by: Hriday | last post by:
Hi there, Please help me..It is urgent This is Hriday, working on windows authentication with Active Directory... My requirment is when a user sends a request to my web Applicatoin I want to...
0
by: RTT | last post by:
here is my current situation. I develop a program on my computer's localhost. From there i contact Active directory succesfull using a connectionstring like:...
2
by: Jim in Arizona | last post by:
My goal, somehow, is to populate a dropdownlist with all the user names in active directory. I don't even know where to begin, really. I added a reference to System.DirectoryServices so I could...
7
by: Vio | last post by:
Hello everyone, i currently a beginner in php. I want to ask about Win2003 Active Directory users. Is it possible to retrieve Win2003 AD (just username & password) with php. I'm currenty...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.