Click to See Complete Forum and Search --> : Editing a txt file


BMLekki
June 12th, 2001, 02:34 PM
I have a txt file that is a list of email addresses, in a singal coulum.

ex.

test@abc.com
test@xyz.com

I want to open the file and pull all of these together and seperate them with a ";".
To look like this:
test@abc.com;test@xzy.com

Thanks,

BMLekki
BMLekki@bpas.com

Iouri
June 12th, 2001, 02:49 PM
dim sLine as string
dim sFinalString as string
Open "c:\temp\temp.txt" For Input As #1 'to read from
Do While Not EOF(1)
Line Input #1, sLine
sFinalString = sFinalString & ";" & sLine
Loop
Close #1

Now sFinalString contains all your strings separated by ;

Iouri Boutchkine
iouri@hotsheet.com