Question:
A macro for Word: I'd like to automate a search replace, would auto-hot-key work?
And
2009-07-17 12:44:10 UTC
I often have to add a line to each line in text I get off the internet. So I open edit, click replace, then search for ^p and replace with ^p^p and finally click replace all.

That's a lot of clicking.

How can I set up a macro to automate this?
Four answers:
?
2009-07-17 15:20:21 UTC
Try recording it, this way:



In versions of Word prior to Word 2007:



1. Click the Tools->Macro->Record New Macro menu item.

2. Under Assign New macro, click the Keyboard button.

3. Enter the key you want to assign the macro to in the Press New Shortcut Key text box. Note that CTRL and ALT keys should be pressed with the actual key to register.

4. If anything comes up in the Current Keys list box, consider a different shortcut -- this one is already assigned.

5. When you're satisfied, click the Assign button, then the Close button.

6. Enter your keystroke sequence. Note that the little Record Macro pop-up menu has a standard recorder pause button. Handy if you have to try something or use Help to look something up in the middle of recording the sequence.

7. When you're done, press the stop button (the usual square recorder stop icon) on the little Macro menu.



In Word 2007:



1. Press ALT/T, then M, then R (the same as above!).

2. Continue with Step 2, above.



Hope that helps.
2014-11-11 07:41:53 UTC
One good way to automate a search replace is to use macro recorder software, download this one called asoftech automation, which can record the search replace process, and then you can repeat them easily.

http://j.mp/1EpmRqc
Magicman
2009-07-17 12:52:01 UTC
Word 2007:

http://office.microsoft.com/en-us/word/HA100997691033.aspx



Word 2003:

http://office.microsoft.com/en-us/word/HP051894201033.aspx
2014-12-01 01:29:59 UTC
problematic factor. browse at yahoo and bing. this can help!


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...