Sep 13 2020 10:18 PM
Hi Experts,
Can someone pls help me and provide me Macro VBA code excel template wherein i have list of website addresses and need to search e-mail id from the entire website by running Macro VBA code and paste it in excel.
Regards
NKD
Sep 14 2020 01:14 AM
I would be happy to know if I could help.
Nikolino
I know I don't know anything (Socrates)
* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.
Sep 14 2020 01:53 AM
Please check this post https://stackoverflow.com/questions/19976326/getting-links-url-from-a-webpage-excel-vba if helps, that's to get all links from the web page.
Sep 14 2020 08:17 PM
@Sergei Baklan @NikolinoDE Hi, thanks for the info. i do not have any hands on and idea in programming. i want to extract e-mail id's in excel from the multiple websites on click of button through macro code..
i appreciate if you can help me in providing working excel with above requirements
Sep 15 2020 09:09 AM
Sep 17 2020 08:01 PM
@NikolinoDE In excel sheet 1 column A will be website addresses and in column B will fetch e-mail id's of website addresses given A.
Sep 18 2020 03:17 AM
Maybe this will help you to create your own VBA code or everything as you wish.
Hyperlinks via VBA
With this macro all hyperlinks of a defined cell range can be read out. In this example, the macro scans column A and lists the results, i.e. all hyperlinks read in column B.
Public Sub Hyperlink_niko ()
'Read out the hyperlink address
Dim hlink As Hyperlink
i = 1
For Each hlink In Sheets (1) .Hyperlinks
Sheets (1) .Cells (i, 2) .Value = hlink.Address
i = i + 1
Next hlink
End Sub
If the hyperlinks are mail addresses, the word mailto: is also automatically output. As a result, you will receive, for example, the email address of the hyperlink as follows: mailto: nikolino@excelsius.com
The following macro removes this addition and only outputs nikolino@excelsius.com as a hyperlink. The addition mailto: is removed.
Public Sub Hyperlink_lino_mail address ()
Dim hlink As Hyperlink
i = 1
'Read out the hyperlink address
For Each hlink In Sheets (1) .Hyperlinks
mail = hlink.Address
mailneu = Right (mail, Len (mail) - 7)
Sheets (1) .Cells (i, 2) .Value = mail new
i = i + 1
Next hlink
End Sub
With the help of the Right () function, this macro removes the addition "mailto:" from the read mail address.
I would be happy to know if I could help.
Nikolino
I know I don't know anything (Socrates)
* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.
Sep 18 2020 05:40 AM
@NikolinoDE thanks but this is not i am looking for.
Example - i have site www.cnbc.com in Colum A in Sheet1.
i want that on click on button the macro code should run and should scan this above website and should search for e-mail id's in the page and when found it should paste it in column B in excel.