dim len = myString.Lenght
dim startSelection = -1 as int
dim endSelection = -1 as int
dim wordCount = 0 as int
for i = 0 to (len - 1)
if myString.charAt(i) = " " or myString.charAt(i) = CRLF or myString.charAt(i) = TAB then wordCount = wordCount + 1 'Assuming single spaces between words
if wordCount = 10 then startSelection = i + 1
if wordCount = 80 then endSelection = i
next
if startSelection >= 0 and startSelection < len and endSelection > 0 and endSelection <= len then
myString = myString.replace(myString.subString2(startSelection, endSelection), "")
end if