instr still returns a value of "0" it's probably something to do with the text i'm using.
also do you happen to know / suggest code for counting the frequency of each letter in a document? i have managed to find some but it's rather long, if not could you tell me how to only find and replace in a certain part of the document?
I'm really curious about the Instr - could you paste the latest version of the statement here? It's usually pointless when people just describe code, as it's the fine details which make the difference, and they're always left out.
As for counting a letter, I know the Find function can do that - to demonstrate, do a Find in Word, check the "Highlight all items found..." checkbox, and hit the Find All button. As well as highlighting (selecting) all of the occurrences found, it tells you the count in the dialogue box. So it should be possible to retrieve the same information in code. I don't know how though, sorry. (
Be careful afterward, as the highlighted items are in fact selected, just as though you dragged over them.)
As for replacing in a certain section, I expect it's just a matter of selecting the text then using the usual replace function/method, but on the Selection object. There are bound to be others in the forum who can provide better detail on this.