Change hyperlink name to url

T

ttc

In excel I have a long list of hyperlinks to favorite places on the web. I
want to print the url addresses. When I turn off the hyperlink only the
"friendly name" is left. Is there a way to change the friendly name to the
url address without manually typing or right clicking/edit hyperlink and then
copying the url for each one?
Thanks!
 
D

Don Guillett

Here's one I did recently for a client.

Sub geturlinfo()
lr = Sheets("copyweb").Cells(Rows.Count, "c").End(xlUp).Row
For Each H In Sheets("copyweb").Range("c1:c" & lr)
With Sheets("dest")
If H.Hyperlinks.Count > 0 Then
myh = H.Hyperlinks(1).Address
dlr = .Cells(Rows.Count, "a").End(xlUp).Row + 1
..Cells(dlr, "a") = Mid(myh, 27, Len(myh) - 37)
End If
End With
Next H
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top