Ludovick Lagrevol
asked on
VBscript : set right for 'send on behalf'
hi,
i'm trying to set in vbscript publicDelegatesBL and/or publicDelegates to users to grant the 'send on behalf' in outlook 2003 / Exchange 2003,
but i 've always an undefined active directory error : Err : -2147467259
Must i set the publicDelegates after ? before ? or the two in one time ? (but how) ?. ... ?
or ?
...
Set objSdUtil = GetObject(req)
delegateList = objSdUtil.GetEx("publicDel egates")
'For Each Desc In delegateList
' debug "Delegate : " & Desc
'Next
' droits a ajouter
trace " Ajout des droits d'envoi DE LA PART de " & utilisateur & " sur la boite " & boiteagerer
monuser = CheckForUser(IDutilisateur ,false)
moncn = right(monuser,len(monuser) -7)
debug moncn
objSdUtil.PutEx ADS_Property_APPEND, "publicDelegatesBL", moncn
objUser.SetInfo
..
i'm trying to set in vbscript publicDelegatesBL and/or publicDelegates to users to grant the 'send on behalf' in outlook 2003 / Exchange 2003,
but i 've always an undefined active directory error : Err : -2147467259
Must i set the publicDelegates after ? before ? or the two in one time ? (but how) ?. ... ?
or ?
...
Set objSdUtil = GetObject(req)
delegateList = objSdUtil.GetEx("publicDel
'For Each Desc In delegateList
' debug "Delegate : " & Desc
'Next
' droits a ajouter
trace " Ajout des droits d'envoi DE LA PART de " & utilisateur & " sur la boite " & boiteagerer
monuser = CheckForUser(IDutilisateur
moncn = right(monuser,len(monuser)
debug moncn
objSdUtil.PutEx ADS_Property_APPEND, "publicDelegatesBL", moncn
objUser.SetInfo
..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Are you sure that you have the right object in objSdUtil ? Try displaying the existing value of publicDelegatesBL , to make sure that you are trying to append it to the right thing.
ASKER
thanks for your help,
with :
objSdUtil.PutEx ADS_Property_APPEND, "publicDelegatesBL", array(moncn)
all is OK
with :
objSdUtil.PutEx ADS_Property_APPEND, "publicDelegatesBL", array(moncn)
all is OK
ASKER
Const SEND_AS = "{AB721A54-1E2F-11D0-9819-
Const ADS_ACETYPE_ACCESS_ALLOWED
Const ADS_FLAG_OBJECT_TYPE_PRESE
Const ADS_RIGHT_DS_CONTROL_ACCES
Const ADS_PROPERTY_CLEAR = 1
Const ADS_PROPERTY_UPDATE = 2
Const ADS_PROPERTY_APPEND = 3
Const ADS_PROPERTY_DELETE = 4
when i try with array, error :
Microsoft VBScript: Type incompatible