Help needed - editing email id's to make them web addresses
I have a list of email addresses - I want to take this list and replace the user’s name and the @ sign and replace it with “www.” CAn I do this ?
Yes you can, I use macros for similar tasks. For example, this should work -
- open the file with the email addresses in it.
- position the text cursor at the beginning of the first line in the file
- ctrl-F(find), place the @ sign in the “Find What” box.
- click “Find Next”
- close the search dialog box
- reposition the text cursor at the beginning of the first line in the file
- start a macro recording, either with the “Macro” menu or the record icon on the toolbar
start of macro here
- tap the home key
- hit the F3 key, the cursor moves to the first @ sign
- hit the right-arrow key, the cursor is now positioned to the right of the @ sign
- hold down the shift-key and tap the home key, the cursor moves to the beginning of the line and highlights the text you’ll replace
- type your replacement text - www.
- tap the home key
- tap the down-arrow
end of macro here
- stop the macro recording either with the “Macro” menu or the stop icon on the toolbar
Now you’re ready! You can replay the macro for each line using ctrl-shift-p or use the play icon in the toolbar. Or if the file is quite large you can have the macro reply until the end of the file. That’s done with “Macro”->“Run a Macro Multiple Times” or by using the fast-forward icon in the toolbar. When the dialogbox shows up you can select “Run until the end of file”.
If you’re going to need to run that macro on more than one file you can save the current recorded macro either from the “Macro” menu or from the toolbar. It will allow you to name it and assigne a key press to it.
A problem with this approach is that the F3 Find Next isn’t quite equivalent to pressing the Find Next button in the Find window, at least for the purpose of macro recording discussed here. An F3 recorded in a macro will perform a find-next action, but it will be on whatever text the find feature was most-recently used with, which is not always going to be an
@symbol (unless all a user ever searches for is
Why not simply record this as a Replacement action?, e.g.:
Invoke Replace window (ctrl+h)
Find what zone:
Replace with zone:
Search mode: Regular expression
direction and wrap settings: as desired
Action: Replace (or Replace All if desired)
Thank you - both methods worked fine ! The second one by Scott is much faster.
I appreciate the help.