Re: VB code to separate names and put each on a separate line.

Tech-Archive recommends: Fix windows errors by optimizing your registry



On Thu, 8 Mar 2007 18:09:09 -0000, "Tony Jollans" <My forename at my
surname dot com> wrote:

This should do it ...

With ActiveDocument.Range.Find
.Execute FindText:="^l", ReplaceWith:=" ", Replace:=wdReplaceAll
.Execute FindText:="^p", ReplaceWith:=" ", Replace:=wdReplaceAll
.Execute FindText:="^w", ReplaceWith:=" ", Replace:=wdReplaceAll
.Execute FindText:=" ", ReplaceWith:="^p", Replace:=wdReplaceAll
End With

... If you have one or more spaces at the beginning of the document you will
get a single blank line at the beginning - and similarly at the end. This
can be dealt with but it's not worth it unless you're likely to need it.
Otherwise it will catch most things.

Hi!

I've been looking for all this type of word equivalents to things we
might find in a doct.

Through trial and error I've been able to use these ^l and ^w, etc.,
in a couple of other macros I've been perfecting. They came in handy
right at a the right time. But I'd like to know what these are
called. I imagine that somewhere in the vbe one might be able to pull
up a list of these if one knew what they were called (?).

Searching through the archives, a couple of people have referred to
them as aliases, if I've interpreted the info correctly, but Genius
gives me other things that don't seem related to these "commands" (or
whatever they're called).

Do they have a name? I collect tips and keep them on my computer and
thumb drive and I'd definitely like to compile a list of these. TIA.

.