vb6 - Create a user in Active Directory from an Infopath form -


I've been searching the web for some time and still can not find anything useful on this topic. / P>

What I am trying to create, there is a button in my infopor that will create a user account in Active Directory. The code will need to be dragged through the information stored in the areas of Infopath form.

I have chosen to use Visual Basic because I believe there is a good language scripting with Eddie.

I successfully run this code:

  Sub CTRL1_12_OnClick (eventObj) MsgBox "Output:" and sub  

Is: 'Output:' in the VB dialog box ' When I click on my Infopath button However, when I try:

obsolete = objou = GetObject ("LDAP: // OU = people, OU = contoso, DC = contoso, DC = com") set objUser = objou All I got an error message in Infopath ("User", "CN = Linda Mitchell") objUser.Put "sAMAccountName", "linda.mitchell" objUser.SetInfo ()

:

The following error occurred:

The ActiveX component object can not be created: 'GetObject' file: script.vbs line: 14

When I put the same code in Notepad, save as vbs file and then execute I am running fine and make the user in Active Directory, which I do not understand is that when I run the same code it will not work.

I would recommend you to check out Richard Mueller's web site - to do all kinds of work There are plenty of VBScript codes for ad content.

Here's how to create a user - help is there ?? I am not much of a VBSP programmer, but I know that Richard's content is usually very good and useful.

It's completely full for you!


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -