Frågan#1
har en funktion för långa rader som ser ut på följande sätt:
'FUNKTION FÖR LÅNGA RADER
function doIt(textSomSkaFixas)
arrText = split(textSomSkaFixas, " ")
for i = 0 To uBound(arrText)
if Len(arrText(i)) > 35 then
newText = newText & " " & Left(arrText(i), 35)
'newText = newText & " " & Right(arrText(i), Len(arrText(i)-35))
newText = newText & " " & Right(arrText(i), Len(arrText(i))-35)
else
newText = newText & " " & arrText(i)
end if
next
doIt = newText
end function
nu är det så att den splittra en lång rad, dvs efter 35 tecken så slittrar den raden skillt med ett mellanslag, men hur gör jag ifall jag vill att den ska radbryta efter 35tecken... har testat följande men det fungerar inte...
' FUNKTION FÖR LÅNGA RADER
function doIt(textSomSkaFixas)
arrText = replace(split(textSomSkaFixas), "vbcrlf ", "<br>")
for i = 0 To uBound(arrText)
if Len(arrText(i)) > 35 then
newText = newText & " " & Left(arrText(i), 35)
'newText = newText & " " & Right(arrText(i), Len(arrText(i)-35))
newText = newText & " " & Right(arrText(i), Len(arrText(i))-35)
else
newText = newText & " " & arrText(i)
end if
next
doIt = newText
end function