Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
kevin gb
 
Posts: n/a
Default Email address extraction from Word document

Please does anyone have a way of extracting all the email addresses from a
long document and placing them in a new document. Presumably a way would be
to look for the @ symbol, then move to the first space before and the last
space after that string, copy and paste into a new document. so much for the
idea, can anyone tell me how to make it happen?
Many thanks if you can
--
kevin
(Word 2003 SP2)
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor
 
Posts: n/a
Default Email address extraction from Word document

Use the find routine (CTRL+F) to find

[ ][a-zA-Z0-9\-_.]{1,}\@[a-zA-Z0-9\-_.]{1,}[ ]

with the wildcards box and the highlight all found entries box checked.
The e-mail addresses will be highlighted.
Close the find dialog. Then copy
open a new document and paste.
This worked for all the e-mail addresses in my database.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



kevin gb wrote:
Please does anyone have a way of extracting all the email addresses
from a long document and placing them in a new document. Presumably a
way would be to look for the @ symbol, then move to the first space
before and the last space after that string, copy and paste into a
new document. so much for the idea, can anyone tell me how to make it
happen?
Many thanks if you can



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
kevin gb
 
Posts: n/a
Default Email address extraction from Word document

Brilliant Graham, that is just the solution (though for some reason the
square brackets at the start and end of the expression need to be deleted for
it to work on my documents).
Many thanks for the expert help.
--
kevin


"Graham Mayor" wrote:

Use the find routine (CTRL+F) to find

[ ][a-zA-Z0-9\-_.]{1,}\@[a-zA-Z0-9\-_.]{1,}[ ]

with the wildcards box and the highlight all found entries box checked.
The e-mail addresses will be highlighted.
Close the find dialog. Then copy
open a new document and paste.
This worked for all the e-mail addresses in my database.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



kevin gb wrote:
Please does anyone have a way of extracting all the email addresses
from a long document and placing them in a new document. Presumably a
way would be to look for the @ symbol, then move to the first space
before and the last space after that string, copy and paste into a
new document. so much for the idea, can anyone tell me how to make it
happen?
Many thanks if you can




  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor
 
Posts: n/a
Default Email address extraction from Word document

I suspect that the e-mail addresses are on lines of their own then? The
search code assumed them to be embedded in text. The brackets contain spaces
that would thus form the start and ends of the addresses. The brackets
themselves are not required.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



kevin gb wrote:
Brilliant Graham, that is just the solution (though for some reason
the square brackets at the start and end of the expression need to be
deleted for it to work on my documents).
Many thanks for the expert help.

Use the find routine (CTRL+F) to find

[ ][a-zA-Z0-9\-_.]{1,}\@[a-zA-Z0-9\-_.]{1,}[ ]

with the wildcards box and the highlight all found entries box
checked. The e-mail addresses will be highlighted.
Close the find dialog. Then copy
open a new document and paste.
This worked for all the e-mail addresses in my database.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



kevin gb wrote:
Please does anyone have a way of extracting all the email addresses
from a long document and placing them in a new document. Presumably
a way would be to look for the @ symbol, then move to the first
space before and the last space after that string, copy and paste
into a new document. so much for the idea, can anyone tell me how
to make it happen?
Many thanks if you can



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting WordPerfect 12 files to Word 2003 Curious New Users 4 May 19th 23 02:48 PM
Reveal codes in a word document FUN101 Microsoft Word Help 4 May 16th 23 08:47 PM
How to put graphics on envelopes? Steve Koenig Microsoft Word Help 21 April 29th 23 02:47 AM
Word should allow to 'divide' page by 3 or 4, not just 2 CandasK Page Layout 2 February 28th 06 10:16 PM
How to reformat a complete document. wanda Microsoft Word Help 16 February 11th 06 11:43 PM


All times are GMT +1. The time now is 05:52 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"