Page 1 of 1

Macro only executes one of two replace functions

Posted: Tue Oct 20, 2009 4:57 pm
by tmpetersen
I Created a macro to add ticks around a string of characters on a line (to make a in clause for oracle).
Starts out as zzzzzzzzzzzz
after macro 'zzzzzzzzzzzz',

Macro
Replace from ^ to '
Replace from $ to ',

save macro.
While creating the macro, it properly does the replace on both sides of the string. When I run it from the macro command, only the left side is performed.

Can someone tell me if I need to do something else to get the macro to finish properly.

Posted: Tue Oct 20, 2009 6:52 pm
by Bob Hansen
Make sure that your macro moves the cursor to a "home" position before doing the replacements.

CTL-HOME will usually bring the cursor to the top left of your document.
HOME will usually bring the cursor to the beginning of the line.

--------------------------------------------
Not sure what these macros do ....
Macro
Replace from ^ to '
Replace from $ to ',

What are the actual Search/Replace strings you are using?
Are the chars that need to be surrounded the only chars on the line? Are they at the beginning, the end, or in the middle?

--------------------------------