A
arne
Can I insert a relative hyperlink in documents using vba? One that will
hyperlink to the main.htm in the same folder ?
(I have a lot of folders, and each of them contain one main.htm, while I
manually save the word converted htmfiles in the correct folder)
I am using word 2000
Sub tomain_arne()
' this is an absolute ref
' I want "E:\docweb\main.htm" to be inserted as a relative reference like
' <a href="main.htm">To main htm in samefolder 1</a>
ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:= _
"E:\docweb\main.htm", SubAddress:="", ScreenTip:="To main htm in
samefolder", TextToDisplay:= _
"To Main"
End Sub
arne
hyperlink to the main.htm in the same folder ?
(I have a lot of folders, and each of them contain one main.htm, while I
manually save the word converted htmfiles in the correct folder)
I am using word 2000
Sub tomain_arne()
' this is an absolute ref
' I want "E:\docweb\main.htm" to be inserted as a relative reference like
' <a href="main.htm">To main htm in samefolder 1</a>
ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:= _
"E:\docweb\main.htm", SubAddress:="", ScreenTip:="To main htm in
samefolder", TextToDisplay:= _
"To Main"
End Sub
arne