the email address from websites using Excel
Extract email address from the website automatically. Search for an email address. List email address next to website address in Excel
Check out my online courses
For more help visit my website or email me at easyexcelanswers@gmail.com.
Contact me regarding customizing this template for your needs.
Click for online Excel Consulting
I am able to provide online help on your computer at a reasonable rate.
Check out my next one-hour Excel Webinar
I use a Blue condensor Microphone to record my videos, here is the link
Check out Crowdcast for creating your webinars
If you need to buy Office 2019 follow
I use Tube Buddy to help promote my videos
Check them out
Follow me on Facebook
TWEET THIS VIDEO
Follow me on twitter
easyexcelanswers
IG @barbhendersonconsulting
You can help and generate a translation to you own language
*this description may contain affiliate links. When you click them, I may receive a small commission at no extra cost to you. I only recommend products and services that I’ve used or have experience with.
Sub getemailfromwebsite()
Dim ie As internetExplorer
Dim url As String
Dim x As Long
Dim html As htmldocument
Dim ElementCol As Object
Set html = CreateObject(“htmlfile”)
Application.ScreenUpdating = False
Set ie = CreateObject(“internetexplorer.application”)
ie.Visible = False
x = 2
Do While Sheet1.Cells(x, 1) (not equal to) “”
url = Sheet1.Cells(x, 1)
‘url = ”
ie.navigate url
Do While ie.readystate(not equal to)readystate_complete
Application.StatusBar = “loading website…”
DoEvents
Loop
Set html = ie.document
Set ElementCol = html.getElementsByTagName(“a”)
For Each link In ElementCol
If InStr(link, “mailto:”) Then
Cells(x, 2).Value = link
Cells(x, 2) = Right(link, Len(link) – InStr(link, “:”))
Cells(x, 2).Columns.AutoFit
End If
Next
x = x + 1
Loop
Set ie = Nothing
Application.StatusBar = “”
Application.ScreenUpdating = True
End Sub
Not equal to is the less than and greater than symbol – not allowed in the description
Watch more new videos about Excel Office | Synthesized by Mindovermetal English
Thank you so much, but i have a question… can i target only a whole column? for example only B? because on the A and C i have other info and the code is taking those too.
Really helps! However, the website i need to access doesn't support IE anymore, is there an update for Microsoft Edge or Chrome?
For Each link In ElementCol doesn't work.
Thank you for this
very good job ….It would be very good to change IE to Chrome. Is it possible to do this? …. I have a problem with the error "424" Object required. Can it be related to the fact that I use Chrome? but I also have IE installed …. very good job
Thank you! It worked for me. How would you edit this code to get more than one email from the site?
I keep getting the error, "User -defined type not defined" and an arrow pointing to the highlighted text "Sub getfromwebsite ()" What can I do to fix this?
Je continue à obtenir l’erreur, « Type défini par l’utilisateur non défini » et une flèche pointant vers le texte mis en surbrillance « Sub getfromwebsite () » Que puis-je faire pour résoudre ce problème?
When I have run the code show the "user-defined type not defined " on "Dim html As htmldocument" and yellow the "Sub getemailfromwebsite()" how can fix this error.
Thank you very very much. It worked ! 🙂 Live Long Mam
Thanks for the tutorial Dear Barb. Would you please share the module for Chrome instead of Internet Explorer?
Hello, I have an url and under this url their is a page for every user. How to get the address from every page?
hey barb it give me synthax error in Do While Sheet1.Cells(x, 1) (not equal to) ""
in red and Sub getemailfromwebsite()
in yellow what does that mean my excel is the french version thank you
Thank you very much. its worked
Thank you very much. It worked ! 🙂
which software you use for code?
how run that code??
Getting error as User-defined type not defined