I'm impressed with the effort jmodic put into this. However, since you claim it is not working for you, I suggest one of two courses of action:

1) Suck up to jmodic and ask him to further refine what he did.

2) Do the string array routine. That is guaranteed to work. Everytime you hit a space, an insert is made, and the rest of the array is processed. End of the array --> go to the next string in your cursor. Takes a lot more processing, but hey, what do you care? That's what computers are for.