Ive just started mucking about with VBA for Word and decided to do a module that would go through a Word document and reverse all the words in that doc ie Tek-Tips becomes spiT-keT (I was bored!) I dont have the code to hand as it was at work however the basis is:
Get number of words in document, loop from 1 to that number, using Selection. get the word (and store in string WordIn) and then loop from the number of letters in the word to 1, each time taking the relevant letter (using MID) and appending it to a String called WordOut before replacing the selection with WordOut.
Everything works fine until the number of characters gets to about 500 and then it stops. Ive debugged, nothing seems out of the ordinary. I dont get an error message or anything else. Ive tried using different variable types for my counters (Single, Double, Integer) but no difference.
Any thoughts?
Get number of words in document, loop from 1 to that number, using Selection. get the word (and store in string WordIn) and then loop from the number of letters in the word to 1, each time taking the relevant letter (using MID) and appending it to a String called WordOut before replacing the selection with WordOut.
Everything works fine until the number of characters gets to about 500 and then it stops. Ive debugged, nothing seems out of the ordinary. I dont get an error message or anything else. Ive tried using different variable types for my counters (Single, Double, Integer) but no difference.
Any thoughts?