Well the obvious way would be to not include b in the selection since this code starts with the selection. The inclusion of the 'select the sentence' line is not such a good idea now that this '/' comes in to play in different positions. If the code just worked with what you selected then we wouldn't need to engineer special solutions to deal with increasingly complex cases.
The previous thread's code solution which processes all paragraphs wouldn't have the benefit of your fiddling the selection. That code could use a different approach by working out whether we have hit the '/' before or after a '-". However, since this code is working with Selection then it is far easier to simply not select the piece you want to ignore.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|