replace link

2 replies [Last post]
Carlo_1975
Offline
Last seen: 5 hours 55 min ago
Title:
Joined: 28 May 2016
Posts: 3
Hi, I would like to create a macro that updates links in my spreadsheet. Basically, I would like to do a loop for each link on the sheet and do an update of the links…

for example: if I have a hyperlink cell named “ITEM” that links to “E: /product_1.jpg”,
macro will change this link to “W: /product_1.jpg”

Of course W is a variable that I will change before launching the macro..
So, once can be E, then K, then H, etc..

I think to use “createEnumeration” to cycle each single link.. and then replace it..
But I do not know how to do.

thanks for suggestions
C.

mark_t
Offline
Last seen: 8 hours 17 min ago
Title: ★★★★
Joined: 26 Apr 2016
Posts: 90
Try to use the Hyperlink
Try to use the Hyperlink worksheet function?

With the following A1 is the cell where you would put “w”, “e” etc.


=HYPERLINK( A1 & ":\product_1.jpg";A1 & ":\product_1.jpg" )

Maybe use cell formatting to make it obvious to user that the cell contains a hyperlink, eg underlined blue text.

LibreOffice 5.1.3.2, Windows 8.1
Carlo_1975
Offline
Last seen: 5 hours 55 min ago
Title:
Joined: 28 May 2016
Posts: 3
Hi mark_t I saw this feature
Hi mark_t I saw this feature HYPERLINK, but I can not figure out how to iterate all hyperlinks on the sheet..

thanks a lot

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.