BobTheElder
Fri Dec 07 12:04:00 PST 2007
Jay & Klaus
Thank you for the different suggestions, I'm learning more and more as I
work on this conversion.
Bob
"Jay Freedman" wrote:
> And on the principle that there's never just one way to do anything, you
> could also use the .MoveEndUntil method, whose Help example goes like this:
>
> With Selection
> .MoveEndUntil Cset:="a", Count:=wdForward
> .MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
> End With
>
> The advantage with this one is that the Cset parameter can be a list of
> characters, and the extension will stop when it hits any one of them. If you
> wanted to extend to the next punctuation mark, you could write
>
> Cset:=".,;:'!"
>
> or some variation on that. There is also a .MoveStartUntil, and both
> ..MoveEndWhile and .MoveStartWhile.
>
> --
> Regards,
> Jay Freedman
> Microsoft Word MVP FAQ:
http://word.mvps.org
> Email cannot be acknowledged; please post all follow-ups to the newsgroup so
> all may benefit.
>
> Klaus Linke wrote:
> > Just noticed to things:
> >
> > Setting ExtendMode isn't actually necessary.
> >
> > And the VBA help for the Extend method has a better code:
> >
> > With Selection
> > .StartIsActive = False
> > .Extend Character:="R"
> > End With
> >
> > That makes sure you're moving the end of the selection, not the start.
> > Quite cool that you can move the Start, really. I wasn't aware of
> > that.
> >
> > Klaus
>
>
>