1
我試圖在ActiveDirectory中創建一個新的用戶用下面的代碼:ActiveX組件不能創建對象:「GetObject的」 InfoPath中
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
該代碼被設置爲從InfoPath中運行,當我點擊按鈕CTRL1_12。但是當我做運行它我得到的是這樣的錯誤:
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
感謝您尋找
彼得