How to...

  • Thread starter Thread starter DizzyD
  • Start date Start date
D

DizzyD

Hey folks,
Got a file that comes as EITHER a one ling string OR same
long string BUT has a Crlf @ (I think) 80 character wrap
and always I need to parse this file into individual
lines (or rows) the rows are always indicated by a tilde.
How do I creat a macro to read the file and return it
back to me one sentence (line) regardless if it has 80
word wrap or one long string? Example file below..

I saw johhny get on the bus~Then johnny went to school~He
then went home~He had lunch at noon~

What I need is this..

I saw johnny get on the bus~
Then johnny went to school~
He then went home~
He had lunch at noon~

Again, this file may be one long string OR it may come to
me wrapped at 80 charcters (regardless of positon of
tilde).

I know some great minds out there can help. I know what I
want it do BUT I can't make it work.
I would like to add this as a macro to WORD or some other
text editor.

Thanks...
 
Dizzy,

You could try this with an Update Query, using the Replace function, so
update YourText to...
Replace([YourText],"~","~" & Chr(13) & Chr(10))
 
Back
Top