Move The Text Cursor Back to Where It Was Before Triggering a Macro

I think Dan's suggestion is the best. Simply make your macro type some string that will never appear otherwise (e.g., ~@CursorPosition@~), then have the macro do its thing, then have the macro search for ~@CursorPosition@~, then have it enter a backspace keystroke. That should eliminate ~@CursorPosition@~ and place the cursor where it was originally.

1 Like