Word 2000: Can I Select all LINEs that contain a certain Character?

M

Mark246

On a Win XP, SP2 PC, I'm using Word 2000.

I've copy/pasted Lots of stuff into one document over the years, and
each entry is separated simply by several blank lines. The first
line
of each entry contains...
John Smith blah blah blah text (e-mail address removed)


How can I go thru the entire document and select ONLY the lines that
contain the @ character?
I need to extract Only Those lines from the file, and I need each of
those Entire Lines.


OPTIMALLY, I'd like to extract FirstName, LastName,
EmailAddress
Is THAT Possible?
Each relevant line IS in the format... FirstName LastName
some other text EmailAddress
separated by Blanks (including random multiple blanks within the
"some
other text" part)
so,... is that Optimal extraction Possible?


THANKS for any clues,... in advance.


Mark246
 
M

Mark246

Lots of good info there, Perry, but I'm not wanting to Replace
anything.

I want to select all of the lines that contain an email address.
How about... simply erase all of the other lines.

Can that be done?

Thanks very much.

Mark246
 
P

Perry

I want to select all of the lines that contain an email address.

With ActiveDocument.Content.Find
.ClearHitHighlight
.HitHighlight ("Your@MailAddress")
End With

I'm sure, others will come up with other ideas...

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top