Originally posted by BurgPath:
I am working with a script to pull information and place it in a text file which I then mail out automatically. I have to eventually pull this data into Excel so I need the info to be in the best possible format.
Heres a sample of where I'm at now:
repout.writeline(objgroup.cn & " " & objmember.displayname & " " & objmember.samaccountname & " " & objmember.physicalDeliveryOfficeName & " " & objmember.title & " " & objmember.department & " " & objmember.mail)'
I'm using the "" to define the spacing but am open to suggestions. I'm new to vb scripts so maybe I'm missing something simple. Is there a way to create a tab delimited file?
Personally, I'd go with a comma-separated-values file (.CSV) or perhaps a tab-delimited file. Separating your fields by a space isn't a good idea (because your field data may also have spaces in it)
CSV file:
"value","value","value"
Tab file:
"value" [tab character] "value" [tab character] "value"
FYI, you can also use Chr(34) to create quotes, and the VB constant "VBTAB" to create a tab character.
This page will help you a lot.