Hi
it’s not clean (macro recorder my hated friend) but you can use that (change the number of line of course)
it will write your link based on col A B data into C (just change the destination if you must)
Not exactly your question but probably the result wanted
dim i as integer
const nbline = 17
sub hyper
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
Feuille = ThisComponent.Sheets(0)
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ToPoint"
args1(0).Value = "C1"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
for i = 0 to nbline
tmpo
next
end sub
'________________________________________________
sub tmpo
dim document as object
dim dispatcher as object
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
Feuille = ThisComponent.Sheets(0)
dim args2(1) as new com.sun.star.beans.PropertyValue
args2(0).Name = "Hyperlink.Text"
args2(0).Value = Feuille.getCellByPosition(1 ,i).string
args2(1).Name = "Hyperlink.URL"
args2(1).Value = Feuille.getCellByPosition(0 ,i).string
dispatcher.executeDispatch(document, ".uno:SetHyperlink", "", 0, args2())
rem ----------------------------------------------------------------------
'rem dispatcher.executeDispatch(document, ".uno:SetHyperlink", "", 0, Array())
dim args3(1) as new com.sun.star.beans.PropertyValue
args3(0).Name = "By"
args3(0).Value = 1
args3(1).Name = "Sel"
args3(1).Value = false
dispatcher.executeDispatch(document, ".uno:GoDown", "", 0, args3())
end sub