I have an excel document with various sheets, containing different tables that I'd need to copy to a
word document. For doing so I created links to tables in an excel sheet, that are updated to the
new path of the excel sheet during this routine:
Sub ChangeLinks()
Dim fld As Field
For Each fld In ThisDocument.Fields
If fld.Type = wdFieldLink Then
If fld.LinkFormat.SourceFullName Like "PATTERN*" Then
fld.Update
fld.Unlink
Exit For
End If
End If
Next fld
End Sub
As you can see, I'm also trying to unlink these links after updating them to avoid
problems. This however doesn't work.
Anyone knows why?
Also: Is there a better way to copy tables from excel to specific points within a existing
word document than the way I do it here?