Hi there.

I'm programming a macro which have to open a word document and (besides other stuff) create a hyperlinks in the opened word document. I've tried the next code

PHP Code: 
Sub escribe()
    
Dim objword As Word.Application
    
    Set objword 
= New Word.Application 'Creo el objeto word
    objword.Documents.Open "C:\Users\ggc\Desktop\Informe2.doc" '
Abro el documento
    objword
.Visible True
  
    objword
.Selection.GoTo What:=wdGoToBookmarkName:=here
    objword
.Selection.InsertAfter "link"
        
    
objword.Selection.Hyperlinks.Add Anchor:=Selection.RangeAddress:= _
        
"Informe.doc"SubAddress:=""ScreenTip:=""TextToDisplay:= _
        
"link"
End Sub 
but the last sentence doesn't work. I've been looking for a solution but couldn't find anything similar, so I hope one of your expert excel minds may help me!!!
thank you!!!!!