Hello,

I have written the following script to populate user info into AD. It
imports info fine for some of the fields...

Particularly I am having trouble with the "description" field. I have
deduced that when I have a number (620) it fails. If I change it to
a620 everything seems to zip right along. I have tried changing the
format of the Excel cell, and changing it to a .csv file to rule out
something goofy with Excels formatting.

If I go directly to AD and edit the field it takes numbers without any
qualms. Am I missing something, or is AD incapable of handling
numbers being imported into this field?




Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open _
("h:\Scripts\test.xls")

Const ADS_PROPERTY_CLEAR = 1
Const ADS_PROPERTY_UPDATE = 2
Const ADS_PROPERTY_APPEND = 3
Const ADS_PROPERTY_DELETE = 4
intRow = 1



Do Until objExcel.Cells(intRow,1).Value = ""

Set objUser = GetObject _
("LDAP://cn=" & objExcel.Cells(intRow,1).Value & ",cn=Users,
dc=xxxxxx, dc=xxxxxx, dc=com")

objUser.Put "mail", objExcel.Cells(intRow, 2).Value
objUser.Put "description", objExcel.Cells(intRow, 3).Value
objUser.Put "physicalDeliveryOfficeName", objExcel.Cells(intRow,
4).Value
objUser.Put "title", objExcel.Cells(intRow, 5).Value
objUser.Put "department", objExcel.Cells(intRow, 6).Value
objUser.Put "telephoneNumber", objExcel.Cells(intRow, 7).Value
objUser.Put "mobile", objExcel.Cells(intRow, 8).Value
objUser.Put "facsimileTelephoneNumber", objExcel.Cells(intRow,
9).Value
objUser.Put "company", objExcel.Cells(intRow, 10).Value

intRow = intRow + 1

Loop

wscript.echo "Finished!"



objExcel.Quit



Thanks in advance for any help!


Jon Ziminsky