473,467 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Active Directory Usage in VBA

NeoPa
32,556 Recognized Expert Moderator MVP
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 8889
ADezii
8,834 Recognized Expert Expert
@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 Recognized Expert Moderator MVP
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
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.