Sub MàJMiens()
Dim sPathNew As String, sPathOld As String, NewLink As String
Dim Ind As Integer, Link As Variant
' Chemin d'accès actuel
sPathNew = ThisWorkbook.Path & "\"
' Pour chaque lien
For Each Link In ThisWorkbook.LinkSources
' Récupérer l'ancien chemin
sPathOld = Left(Link, InStrRev(Link, "\"))
' Définir le nouveau chemin
If InStr(1, sPathOld, "Annuel") > 0 Then
NewLink = Replace(Link, sPathOld, sPathNew & "Annuel\")
ElseIf InStr(1, sPathOld, "Trimestriel") > 0 Then
NewLink = Replace(Link, sPathOld, sPathNew & "Trimestriel\")
End If
' Modifier le lien
ActiveWorkbook.ChangeLink Name:=Link, NewName:=NewLink, Type:=xlExcelLinks
Next Link
End Sub