Home All Groups Group Topic Archive Search About
Author
16 Oct 2005 1:00 AM
JanAdam
I am relatively new to VB and VBA. I am learning on doing little projects. I
would like to capture user keyboard entries to allow entering diacritic
characters or special symbols to an Office application. E.g. typing \m would
result in sending a Greek micron letter or  \int would insert an integral
symbol. I have been trying to employ KeyPress event and then using SendKeys
to pass the code of the symbol to the application.



My problem is that it works (sort of) only if I type to a tex box on the
user form on which the KeyPress sub sits. And it sends the processed text to
the same text box rather than to the application.



However, it must be possible to capture and process keyboard while typing
directly to an application. Autocorrect works like that. How is it done? I
do not want to use autocorrect for two reasons: first I will not learn
anything new and second it is triggered by typing a space, making using it
cumbersome if there should be no space following the special symbol.



Any suggestions please?



JanAdam

Author
16 Oct 2005 5:03 AM
Hal Rosser
Its been a while, but I think you can set a property of the form to preview
keystrokes -
and then you can use the keypress event of the form.

HTH