Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Mar 2015
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    extract phone numbers and email addresses

    Hi,

    Please share Microsoft Word VBA code for extracting phone numbers and Email Addresses from multiple Microsoft word documents.


    Thank you in advance.

  2. #2
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,168
    Thanks
    47
    Thanked 978 Times in 908 Posts
    There is no guarantee that email and phone info is in a document so there is can be no generic code to extract it.
    Are you after information about the document author from the document Properties?

    cheers, Paul

  3. #3
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,433
    Thanks
    371
    Thanked 1,456 Times in 1,325 Posts
    Ajaypal,

    Welcome to the Lounge as a new poster!

    What you need are regular expressions and Word Advanced Find.

    Just google: "regular expression for phone number" and "regular expression for email address" these can then be used in some VBA do to what you want.

    Here's a link for the phone numbers.

    See post #8 in this thread for some code to loop through documents.

    HTH
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  4. #4
    New Lounger
    Join Date
    Mar 2015
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I want to extract email addresses and phone numbers from n numbers of resumes. if you know please help

  5. #5
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,168
    Thanks
    47
    Thanked 978 Times in 908 Posts
    Without knowing the format of the documents it's difficult to advise. You could search the documents for anything that looks like an email address (with an @ symbol and a dot something) and search for numbers in groupings that make sense for a phone number. Even that is guess work and if you need accuracy you are going to have to read the documents.

    cheers, Paul

Posting Permissions

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