#1
|
|||
|
|||
Inserting key strokes with a macro line
In a WORD macro I need a line to enact the equivalent of the ESC key.
I’m using the “Find and Replace” function in WORD. Sometimes there appears the usual dialogue box asking if I want it to search the rest of the text; I don’t, so I have to click on “NO” in the box or hit the ESC key. I need a macro line that will do the equivalent to hitting ESC automatically, so that the dialogue box doesn’t appear and halt the search every so often? Thanks for any help. ACA |
#2
|
||||
|
||||
Hi ACA,
This sounds more like a need to change '.Wrap = wdFindAsk' to '.Wrap = wdFindStop'.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thanks, Paul. That's the solution, really. Much obliged.
Still, I'd like to know if it's possible in Word VBA, to insert the equivalent to keystrokes. I understand there's such thing as wdKeyEsc (or code 27) for the ESCAPE key, etc. But I d'ont know how to use that. And in Excel you can write Application.Inkeys {ESC}, I think, to that end. But in Word macros? But for my current need for Find and Replace, you saved the day. Thanks again. ACA |
#4
|
||||
|
||||
To insert keystrokes, you can use SendKeys, but you need to be careful how & when you use it.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Thanks again, Paul.
Yes, I was thinking of SendKeys; and I'll mind your warning I added to your reputation. ACA |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do you extend line down the trend line to the x axis? | madoka | Excel | 0 | 11-01-2012 09:18 PM |
Use macro to place line style around graphic | AdvanceTheMan | Word VBA | 1 | 04-20-2012 08:18 PM |
I indent second line and the first line indents, help. | DerekUD | Word | 1 | 05-06-2011 11:26 PM |
Need help on Macro 03- Find text - if text is blank then remove line | simpleonline1234 | Word VBA | 1 | 02-25-2011 02:28 AM |
Macro that will go to line # and center text | marge | Word VBA | 0 | 09-10-2010 12:30 PM |