Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Sep 2002
    Posts
    210
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Find/Replace function (2000/SR-1)

    I have a Word document that contains about 200 email addresses (in addition to other data). What is the easiest way to isolate and copy the email addresses to another document without copying/pasting each one individually?

    Thanks.
    Pooja

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Find/Replace function (2000/SR-1)

    Culling or harvesting e-mail addresses from documents is something that has been discussed before, but unfortunately I can't remember where I've read about it. I believe the general principle was to find the pattern "words@words" and that the complexity depends on what else might precede or follow the address--e.g., ( ) , ; . and so on. Have you tried a search on our Word and VB/VBA boards? Hopefully that will turn up something useful.

    Or, if your text is "structured" in any database-like way, there are ways to convert it to a table, or enable rectangular selection, that would speed up copy-and-paste (from individual items to large chunks).

    Oh, and if Word converted the e-mail addresses to hyperlinks, that could be used to identify them in a macro.

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find/Replace function (2000/SR-1)

    As a follow-up to what Jefferson suggested, you might find an expression that will find your email addresses & place that in a macro. Then you could add something like:

    NormalTemplate.AutoTextEntries.AppendToSpike Range:=Selection.Range

    & do a loop. The macro would go through the document & cut each email address to the spike. You could place it in another document by typing "spike" (no quotes) & pressing F3. Or you could insert & empty the spike by simply pressing Ctrl+Shift+F3 without typing anything. If you do this, make sure that you do this on a COPY of the document! If something goes wrong, you don't want to lose all your addresses.

  4. #4
    3 Star Lounger
    Join Date
    Sep 2002
    Posts
    210
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find/Replace function (2000/SR-1)

    Thank you both! The text is not structured in any specific order so I can't use tables etc. I'll try the other suggestions and see what happens..... [img]/forums/images/smilies/smile.gif[/img]

    Pooja

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find/Replace function (2000/SR-1)

    This expression should find all email addresses using Edit|Find & with Use wildcards checked:

    <[a-zA-Z0-9_.]{1,}@[a-zA-Z0-9_.]{1,}.???>

    If there is some punctuation besides a period or underscore in the addresses, you should add them to the first & second expression inside the brackets.

  6. #6
    3 Star Lounger
    Join Date
    Sep 2002
    Posts
    210
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find/Replace function (2000/SR-1)

    Thank you again! I'll try it and let you know if it works!

    Pooja

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •