# Write lines in a txt using vbs vertically instead of horizontally

hi,
i know the vbs commands to output words\text into a .txt file regulary.
is there any command to write it vertically ?
so that "i want to go" will be
i
want
to
go
###### Who is Participating?

x

Commented:
Read the string to be written char by char.
if char = " " then write a new line

I don't know in vbscript, but this is how it works in vb.net

 Dim youroutputstring As String = "I want to go"
Dim stringlength As Integer = YourOutputString.length
Dim p As Integer = 1
Dim a As Integer = 1

Do Until p = stringlength
If Mid(youroutputstring, p, 1) = " " Then
' write word to file
' test with: msgbox(Mid(youroutputstring, a, (p - a)))
' WRITE WITH YOUR OWN CODE: Mid(youroutputstring, a, (p - a)) & vbcrlf
a = p
End If
p = p + 1
Loop

' print last word also
' test with: MsgBox(Mid(youroutputstring, a, (p + 1 - a)))
' WRITE WITH YOUR OWN CODE: Mid(youroutputstring, a, (p - a)) & vbcrlf

0

Commented:
Yes it is possible. Send your code. I'll modify it.
0

Commented:
Ma Kore johnny ?

What you trying to do ?
there maybe a number of ways.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.