A
awrightus
Not looking for exact syntax, just a recommendation. Using VB Express
2008. I have a string that's X characters in length (perhaps
2000-4000 characters or so, essentially sentences). I need to insert
a carriage return (vbCrLf) at no more than the 69th character. If the
69th character is a space, then that's the simplest scenario. But if
the 69th character is in the middle of a word, I need to search back
until I find a space and then insert the vbCrLf. I know how to use
substring() to search through the string for spaces, but I'm getting a
little lost on an approach to subsequently inject that carriage return
at every subsequent 69th character (or backing up when it's in a
middle of a word). Just wondering if someone could give me a
suggestion as to the functions I need to be looking at. Thanks for
any insight.
2008. I have a string that's X characters in length (perhaps
2000-4000 characters or so, essentially sentences). I need to insert
a carriage return (vbCrLf) at no more than the 69th character. If the
69th character is a space, then that's the simplest scenario. But if
the 69th character is in the middle of a word, I need to search back
until I find a space and then insert the vbCrLf. I know how to use
substring() to search through the string for spaces, but I'm getting a
little lost on an approach to subsequently inject that carriage return
at every subsequent 69th character (or backing up when it's in a
middle of a word). Just wondering if someone could give me a
suggestion as to the functions I need to be looking at. Thanks for
any insight.