Hyperlink change after email...
Whoops - sorry - yes.
What I should have said was "to avoid the problem you need to set an
impossible base before creating the hyperlinks". That will cause the
hyperlinks to be created as absolute rather than relative.
Running the following macro should do the trick of converting the
relative links to absolute:
Sub FixHyperLinks()
Dim WS As Worksheet
Dim H As Hyperlink
ActiveWorkbook.BuiltinDocumentProperties("Hyperlin k Base") = _
"\\NoServer\NoFolder"
For Each WS In ActiveWorkbook.Worksheets
For Each H In WS.Hyperlinks
If Mid(H.Address, 2, 1) ":" And _
Left(H.Address, 2) "\\" Then
H.Address = ActiveWorkbook.Path & "\" & H.Address
End If
Next
Next
End Sub
Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup
|