I think I mis-read your question. Sorry about that. I thought you wanted
the first 30 words.
Ray at home
"Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message
news:%23BsT4x2nDHA.3700@TK2MSFTNGP11.phx.gbl...[color=blue]
> Here's a
vb SCRIPT way.
>
> <%
> TheString = "I need to parse a long string into no more than 30 character
> chunks, but I also need to leave the words intact. Right now, I am using
> and it's fine, but splits up some of the words. If I could figure out how
> to find the preceding space of the 30 limit, I'd be in good shape. Any
> thoughts would be appreciated. Many thanks in advance."
>
> '''clear out any double+ spaces
> Do While Instr(TheString, " ") > 0
> TheString = Replace(TheString, " ", " ")
> Loop
>
> aParts = Split(TheString, " ")
> Redim Preserve aParts(29)
>
> For q = 0 To 29
> Response.Write aParts(q) & "<br>"
> Next
> %>
>
> Ray at home
>
>
>
>
>
> "meldrape" <anonymous@discussions.microsoft.com> wrote in message
> news:04d801c39f3a$fd9c62f0$a301280a@phx.gbl...[color=green]
> > Hello,
> >
> > I need to parse a long string into no more than 30
> > character chunks, but I also need to leave the words
> > intact. Right now, I am using:
> >
> > For intStart = 1 to Len(strOriginal) by 30
> > strPrint = Mid$(strOriginal, intStart, 30)
> > Print #detailFile, Tab(1), intStart, Tab(4), strPrint
> > Next intStart
> >
> > and it's fine, but splits up some of the words. If I
> > could figure out how to find the preceding space of the
> > 30 limit, I'd be in good shape. Any thoughts would be
> > appreciated. Many thanks in advance.
> >[/color]
>
>[/color]