Link to home
Start Free TrialLog in
Avatar of EfrenM
EfrenMFlag for United States of America

asked on

VBscript objUser.info

Hello all

i know this might be something simple but cant figure it out, i am using objUser.info to add information and it works perfect, however if anything is in that field it deletes it, anyone know anyway to append to it? below is a piece of the code
objUser.info = Incident     <--- pull data from a input box
objUser.SetInfo
      objUser.AccountDisabled = TRUE
      objUser.HideFromAddressBook = True
      objUser.SetInfo
      SET objCont = GetObject("LDAP://" & strNewOUDN)
      objCont.MoveHere adoRec.Fields("ADsPath").Value, vbNullString
      Msgbox "Account disabled", vbInformation, "Confirmation"
      Msgbox "Did you Check Oracle?", vbInformation, "Confirmation"
      Msgbox "Did you Check Blackberry Account?", vbInformation, "Confirmation"
      adoRec.MoveNext

Open in new window

Avatar of Hubasan
Hubasan
Flag of United States of America image

All you have to do is assign initial data to a variable and then append the variable with different value using "&" symbol:

sMydata = objUser.info ' this will read and place current state of objuser.info to sMydata variable.

Then you can do:

sMydata = sMydata & " adding this text to initial variable"

wscript.echo sMydata

Avatar of EfrenM

ASKER

sweet it works :)  below is the code i used, hey how can make it press enter so it looks like this
Test <---- was already in profile
12345 <-- input box value

it currently adds it to test12345

ill put in some more points =]

sMydata = objUser.info
sMydata = sMydata
objUser.info = sMydata & Incident <-- pulls from a input box at start
objUser.SetInfo

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Hubasan
Hubasan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of EfrenM

ASKER

sweet =], thnx a mill,
Avatar of EfrenM

ASKER

a bonus =]
Heheh...no problem. Thanks for the bonus points :-) and the grade.