Email Address Harvesting Software
To collect Email Ids from website, use this Mass Email extractor or Email harvesting software.
This is mainly used by marketting people to communicate a product advertisement to a large group of people (or personalized Email to list of addresses). We seek the help of email marketing products to extract electronic mail addresses from any of these sources – emails address list, text files, web pages or Url etc.,).
Use our product for free and buy it from our products page, once you are satisfied. Also you can learn how to build yourself a email extractor from URL. Read to know more.
Website Email Extractor – Input Format
Before proceeding with extracting Email addresses, let’s understand the basics about Email Addresses.
Every Email address corresponds to an electronic mail Box & has a Local Part and a Domain part separated by symbol “@”. (Local_Part@Domain.Part)
Related Topic: How to Fetch Email Ids from Outlook Email?
There are some restrictions on what are the allowed characters (Alphabets, Special characters, Numbers etc.,) in these sections. To know more details about limitations of these 2 sections refer to the guidelines of RFC 6531 or Wiki reference at end of this article.
Limitations of Email Extractor: At this point, we are going to assume the below points for our VBA code to work.
- Local & Domain part does not have SPACES, Double Quotes and any of these special characters “(),:;<>@[\]”.
- Excel Cell has limitation for number of characters. If the text content has very huge content, modify the code to read the content from a text file and parse the email Ids.
How to Extract Email address from Website or URL?
The Excel Macro VBA code in this page scans the text content, character by character and extract email Ids from website (local & domain parts) in that page.
- If the content is in text file, copy paste the text file to Excel sheet 1, cell A2 and execute this code.
- If the content is in webpage, get the HTML source of the webpage and paste in the Excel in same location as above.
Once, the content is copied to Excel sheet (Excel macro for beginners), press Alt+F11 to go to VB Editor. Then cope paste the below code and Execute the code by pressing F5.
Note: By Combining this code and the code from this page, you can make code to extract emails from websites all by yourself.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576Private Sub Email_Extractor_From_Website()Dim oWebData As Object, sPageHTML As String, sWebURL As String'Change the URL before executing the codesWebURL = "https://officetricks.com"'Extract data from website to Excel using VBASet oWebData = CreateObject("MSXML2.ServerXMLHTTP")oWebData.Open "GET", sWebURL, FalseoWebData.sendsPageHTML = oWebData.responseText'Get webpage data into ExcelExtract_Email_Address_From_Text sPageHTMLEnd Sub''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Visit our website for more Tips and Tricks' ---- Officetricks.com ----'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''Private Sub Extract_Email_Address_From_Text(Optional Text_Content As String)Dlim_List = " ""(),:;<>@[\]"'Get Text Content and assign to a VariableIf Text_Content = "" ThenText_Content = ThisWorkbook.Sheets(1).Cells(2, 1)End IfWeb_Page_Text1 = Text_ContentIf Web_Page_Text1 = "" ThenMsgBox "Error: No Input Provided - Provide Input"Exit SubEnd If'Scan each word in Text and Extract Email AddressesORow = 2While (Web_Page_Text1 <> "")'Locate position of symbol "@"First_@ = VBA.InStr(1, Web_Page_Text1, "@", vbTextCompare)'If there is no occurance of "@" then terminate processIf First_@ = 0 Then GoTo End_sub:'SeperateWeb_Page_Text2 = VBA.Mid(Web_Page_Text1, 1, First_@ - 1)Web_Page_Text3 = VBA.Mid(Web_Page_Text1, First_@ + 1)Dlim_Pos_Max = 99999Dlim_Pos_Min = 0For i = 1 To VBA.Len(Dlim_List)Dlim_2_Compare = VBA.Mid(Dlim_List, i, 1)Dlim_Pos = VBA.InStrRev(Web_Page_Text2, Dlim_2_Compare, -1, vbTextCompare)If (Dlim_Pos > Dlim_Pos_Min) And (Dlim_Pos > 0) Then Dlim_Pos_Min = Dlim_PosDlim_Pos = VBA.InStr(1, Web_Page_Text3, Dlim_2_Compare, vbTextCompare)If (Dlim_Pos < Dlim_Pos_Max) And (Dlim_Pos > 0) Then Dlim_Pos_Max = Dlim_PosNext iIf Dlim_Pos_Max = 0 Then GoTo End_sub:'get Email list to Text VariableEmail_Domain_Part = VBA.Mid(Web_Page_Text3, 1, Dlim_Pos_Max - 1)Email_Local_Part = VBA.Mid(Web_Page_Text2, Dlim_Pos_Min + 1, VBA.Len(Web_Page_Text2) - Dlim_Pos_Min)Mail_Address = Email_Local_Part & "@" & Email_Domain_Part'Scan through remaining contentORow = ORow + 1ThisWorkbook.Sheets(1).Cells(ORow, 2).SelectThisWorkbook.Sheets(1).Cells(ORow, 2) = Mail_AddressWeb_Page_Text1 = VBA.Mid(Web_Page_Text1, Dlim_Pos_Max + First_@ + 1)WendEnd_sub:MsgBox " Process Completed"End Sub
Email Extractor Software Download
In recent Google and Web technology we use these fancy words like Spider, Crawler often. Such software sweep through complete code or content and extract the information that they are meant to harvest.
Thus this Excel VBA Code is an Email Spider which provides email marketing help. Huge number of Emails can be extracted with this automation process in just one click, which will save lot of manual effort.
Download Free Email Extractor from Website to Excel Downloaded 682 Times
Note: Refer to the limitations explained in Format of Email Address & Wiki reference, before using this template. If the code is not working at some point, it might be due to the limitation explained in these sections.
Wiki Reference: Email addresses format and limitations
Email Extractor from Website or URL using Excel App