Този код преминава през всички Екселски файове от дадена папка и сменя всички хиперлинкове:
Sub LoopThroughFilesAndChangeAllHyperlinks()
Dim hLink As Hyperlink
Dim ws As Worksheet
Dim wb As Workbook
Dim MyObj As Object, MySource As Object, file As Variant
'Set the destination folder. Replace username with your username.
Const FOLDER As String = "C:\Users\username\Desktop\Excel\"
file = Dir("C:\Users\username\Desktop\Excel\")
'Disable screen updating
Application.ScreenUpdating = False
'loop through all files
While (file <> "")
'Find a Workbook
If Right$(file, 4) = "xlsx" Or Right$(file, 3) = "xls" Then
'Check whether you have found an Excel file in the specified directory
MsgBox "found " & file
'Open the Workbook
Set wb = Workbooks.Open(FOLDER & file)
For Each ws In Worksheets
For Each hLink In ws.Hyperlinks
'Replace the hyperlinks here
hLink.Address = Replace(hLink.Address, "http://www.youroldwebsite.com/", "http://www.yournewwebsite.com/")
Next hLink
Next
'Save the Workbook and close it
ActiveWorkbook.Save
wb.Close
End If
'Select another Workbook
file = Dir
Wend
End Sub
За целта създай macro-enabled Екселски файл и го постави в друга директория.
Тук има линк със всички методи и свойтва, които можеш да ползваш за тип хиперлинк: https://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.hyperlink_members.aspx
Отбележи този отговор, ако ти върши работа. Успех!