How can I tell a macro to go to . . .

  • Thread starter Thread starter InOverMyHead
  • Start date Start date
I

InOverMyHead

How can I tell a macro to go to a coma, then select everything from there to
the next coma, then delete selection?

Any help would be greatly appreciated.

Bob
 
No macro needed:

Click the insertion point where you need to start the selection
Press F8 (turns on Extend Selection Mode)
Press comma (Word extends a selection from the insertion point to the next
letter pressed - in this case the comma)
Press Delete.

The Extend Selection command is often overlooked in Word but is most useful.
Above is how to extend from the insertion point to the next character typed
(note that you can repeat entering the characters and the extend selection
will continue until it is cancelled). So to select sentences, you press F8
followed by the STOP until you have selected all the sentences you need.
Press ESC to end Extend Selection.

Other functions of Extend Selection are:

F8 initiates Extend Selection
F8 + F8 selects next word to the right of the insertion point
F8 + F8 + F8 selects the current sentence
F8 + F8 + F8 + F8 selects the current paragraph
F8 + F8 + F8 + F8 + F8 selects the current section (if more than one
section) or document
F8 + F8 + F8 + F8 + F8 + F8 selects the current document (if more than one
section)

Press the ESC key to cancel Extend Selection.
 
You don't need a macro, a Find/Replace with widlcards will do this.
\,[+0-9A-z).( –_-]{1,}\,
will select every thing from one comma to the next, including the commas,
just leave the Repalce with box empty and the selection will be deleted.
Remember to check the Use Wildcards in the More options.
 
Terry, very true, F8 is a very useful tool, also don't forget SHIFT+F8 to
reduce the size of a selection.

DeanH
 
Back
Top