Forum Discussion
Sharadratra
Aug 26, 2022Copper Contributor
Update linked file in word document
Hi All, I need your desperate help please... Basically I have a word file which contains number of tables which are linked with a file from 2021. Now I want to update the links from 2021 file to ...
Aug 26, 2022
Sharadratra If the change to be made to each link is to replace 2021 with 2022, you could use a macro containing the following code
Dim afld As Field
With ActiveDocument
For Each afld In .Fields
If afld.Type = wdFieldLink Then
afld.Code.Text = Replace(afld.Code.Text, "2021", "2022")
End If
Next afld
End With