I am working with a textbox in Word VBA. I want to simplify typing accented letters in the box. For example, to type “é” I want the user to type “e” and then an apostrophe, which I want to make add an accent to the “e” to make it “é”.
How can I:
a) Know when the user has typed an apostrophe; would the KeyDown event help here?
b) When he has typed an apostrophe, see what the immediately previous character in the text is;
c) If the previous character is an “e”, then
a. Delete the “e”
b. Type a Chr(130): é
c. Not process the apostrophe typed.
If I can find out how to do that, I can do the same for all the other accented characters, upper and lower case.