Hi All,
I found this VBA code, would appreciate if this code can be adjusted.
Let say I have my excel file in different folder location, (i.e. D: drive) and the files to be hyperlink are in Local server (F: Drive = shared network "Mapped") and should search through several sub-folder (i.e. Drawings, Documents and Models)
Also, if the name in excel is NO MATCH found in the folders should NOT hyperlink. For me to find out if there are missing files.
Any help is very much appreciated.
Sub Add_Hyperlinks()
Dim c As Range
Dim sAddress As String
For Each c In Selection
If c <> "" Then
sAddress = "PDFS" & _
Replace(c.Text, " ", "") & ".pdf"
c.Parent.Hyperlinks.Add _
Anchor:=c, Address:=sAddress, _
TextToDisplay:=c.Text
End If
Next c
End Sub
Thanks,
Mielkew
Bookmarks