Solved

VBscript objUser.info

Posted on 2009-05-19
6
1,262 Views
Last Modified: 2012-05-07
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

0
Comment
Question by:EfrenM
  • 3
  • 3
6 Comments
 
LVL 7

Expert Comment

by:Hubasan
Comment Utility
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

0
 
LVL 2

Author Comment

by:EfrenM
Comment Utility
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

0
 
LVL 7

Accepted Solution

by:
Hubasan earned 500 total points
Comment Utility
you can use:
objUser.info = sMydata & vbcrlf & Incident

vbcrlf is a VBS command that stands for VisualBasicCarriageReturnLineFeed. That should do the trick.



0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Author Comment

by:EfrenM
Comment Utility
sweet =], thnx a mill,
0
 
LVL 2

Author Closing Comment

by:EfrenM
Comment Utility
a bonus =]
0
 
LVL 7

Expert Comment

by:Hubasan
Comment Utility
Heheh...no problem. Thanks for the bonus points :-) and the grade.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Welcome back!  My apologies for taking so long to write part two of this series; it's been a long time coming!  As I promised in Part 1, this article will focus on how to locate those elusive AD properties that you are searching for.  Why is this us…
This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now