How to create a real-time macro for Word?
I need to code a macro which will search and replace a particular text. But the problem is I need to run it in background permanently so that as soon as the user types the particular word and presses space bar to the type the next word, the replacing should take place then and there. Similiarly this should continue till the user closes the Word file.
Any idea how to implement this?
Re: How to create a real-time macro for Word?
Hi,
Do you have to do it using a macro, or is it just the task that you need to accomplish? If the latter, then you could just enter the word into AutoCorrect. if the former, then maybe you could use AutoCorrect anyway, but do it through code...
zaza
Re: How to create a real-time macro for Word?
Actually search and replace was only the beginning. I need to do more options like changing color, underline etc...
And the worst part.....all in real-time without disturbing the typing user.
Re: How to create a real-time macro for Word?
Could be a nightmare. The reason is that you can't use any of the normal methods of doing such things, because you can't move the insertion point if the user is still typing. If you can hook into the AutoCorrect to do all of these things for you, then I reckon that's your best hope.
Have a look and see what you can do with it.
zaza