repair broken links

  • Thread starter Thread starter Guido
  • Start date Start date
G

Guido

I have many (1000) files with links to another file which
is however located in a different (sub)directory or in a
different path.
Whenever anyone changes the name of a subdirectory in
that path, all links are "lost".
Of course, I can do "update links" manually, file by file.
But is there an automatic way (or a trick) to do this?

Thanks for your help.
 
Something like this :-

'------------------------------------------------
Sub ChangeLink()
Dim OldPath As String
Dim NewPath As String
'--------------------
OldPath = "C:\_CAPEX\Book1.xls"
NewPath = "C:\TEMP\Book1.xls"
ActiveWorkbook.ChangeLink _
Name:=OldPath, _
Newname:=NewPath, _
Type:=xlExcelLinks
End Sub
'------------------------------------------------
 
Back
Top