我正在尝试使用以下代码在ActiveDirectory中创建一个新用户:
Sub CTRL1_12_OnClick(eventObj)
Set objOU = GetObject("LDAP://OU=Users,dc=mfcvt,dc=local")
Set objUser = objOU.Create("User", "cn=MyerKen")
objUser.Put "sAMAccountName", "myerken"
objUser.SetInfo
End Sub
当我点击按钮CTRL1_12时,此代码设置为从Infopath运行。但是当我运行它时,我得到的就是这个错误:
Infopath cannot complete this action, because of an error in the form's code.
The following error occurred:
ActiveX component can't create object: 'GetObject'
File:script.vbs
Line:20
感谢您寻找
彼得