Edit many hyperlinks

  • Thread starter Thread starter David S
  • Start date Start date
D

David S

I have a spreadsheet that has a column of hyperlinks. The
address of all the hyperlinks is identical (each cell is a
hyperlink to a unique image in a common folder on my
computer. Is there an easy way to change all of the
addresses i.e. I want to move the images to a new folder.
Thanks,
David
 
Hi David

Run a macro like this:

Sub LoopThem()
Dim H As Hyperlink
For Each H In Sheets(1).Hyperlinks
H.Address = Replace$(H.Address, "C:\Pictures", "C:\Pornfiles")
Next
End Sub

HTH. Best wishes Harald
 
Back
Top