Hi,
Can someone suggest a funtion to break a string at the first space after each 30 characters of the string (string can be any length) and insert a line break so that it fits into the column space of a table.
This is what I have where it breaks after each 30 chars however I want to break it at a space.
If Len(str) > 30 Then
If Len(str) < 62 Then
str= Left(str, 30) & "<br>" & Right(str, Len(str) - 30)
str= Left(str, 61) & "<br>" & Right(str, Len(str) - 61)
Thanks in advance.
Can someone suggest a funtion to break a string at the first space after each 30 characters of the string (string can be any length) and insert a line break so that it fits into the column space of a table.
This is what I have where it breaks after each 30 chars however I want to break it at a space.
If Len(str) > 30 Then
If Len(str) < 62 Then
str= Left(str, 30) & "<br>" & Right(str, Len(str) - 30)
str= Left(str, 61) & "<br>" & Right(str, Len(str) - 61)
Thanks in advance.