I am working with VBA in Word to analyze all the words in a given document and I want it to recognize numbers written as strings. My goal is to get the program to recognize that not only are "21" and "twenty-one" numbers, but "vingt et un" and "ein und zwanzig" are numbers too. The program solves that by putting in unbreakable spaces to make such multi-word numbers single units that the program recognizes.
My problem is that if I save the revised document so that I will not have to add those spaces the next time I run my program on the text, the program cannot see that "vingt@et@un" (where @ is an unbreakable space) is different from "vingt et un".
I do not want to change the spaces to some other character, because I want the document to look the same as it did before the program added the unbreakable spaces.
I suspect the problem is unsolvable. Any suggestions to the contrary are most welcome.
John Robin (in Priddis, Alberta)