>Thanks for quick reply Hilmar.
>but the data is on 1 single line not 3 separate lines ,unfortunately
In the sample code, I assumed the text was on a single line. The alines() command separates the text files into seperate lines, but only the first line is used. (It may be unnecessary, depending on the exact structure of your data. But often it is convenient to separate a long text into lines.)
Note that I am always using laMyLines(1) - the first line.
The part that changes is the second parameter for GetWordNum() (1, 2, 3, indicating the first, second and third "word" or part).
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)