C
Cheese_whiz
Hi all,
I have a macro that selects the next/current sentence as a whole. I found
it on a post around here.
The problem is it often selects a space or two before or after the actual
sentence, including often selecting the blank line above or below the
sentence.
I've done a search (a few of them), and I can't find any way to remove those
leading/following spaces from the current selection. Anyone have any ideas?
Here's the one line macro for selecting the sentence:
Selection.Sentences(1).Select
It works well except for picking up spaces before or after the sentence. I
also tried modifying it like this:
Selection.Sentences(1).Select
Selection.MoveStartWhile Cset:=" ", Count:=wdForward
Selection.MoveEndWhile Cset:=" ", Count:=wdBackward
Thanks, in advance.
CW
I have a macro that selects the next/current sentence as a whole. I found
it on a post around here.
The problem is it often selects a space or two before or after the actual
sentence, including often selecting the blank line above or below the
sentence.
I've done a search (a few of them), and I can't find any way to remove those
leading/following spaces from the current selection. Anyone have any ideas?
Here's the one line macro for selecting the sentence:
Selection.Sentences(1).Select
It works well except for picking up spaces before or after the sentence. I
also tried modifying it like this:
Selection.Sentences(1).Select
Selection.MoveStartWhile Cset:=" ", Count:=wdForward
Selection.MoveEndWhile Cset:=" ", Count:=wdBackward
Thanks, in advance.
CW