Hi there;
If all the files (Excel and Word files) are in the same folder, you can try the following Excel VBA code;
Sub Test()
'Haluk - 07/10/2021
'sa4truss@gmail.com
'https://excelhaluk.blogspot.com/
Dim wordFile1 As String, wordFile2 As String
Dim objWord As Object, objDoc1 As Object, objDoc2 As Object
Const wdGoToLine = 3
Const wdGoToNext = 2
Const wdSaveChanges = -1
wordFile1 = ThisWorkbook.Path & "\word_template_1.docx"
wordFile2 = ThisWorkbook.Path & "\word_template_2.docx"
Set objWord = CreateObject("Word.Application")
Set objDoc1 = objWord.Documents.Open(wordFile1)
objDoc1.tables(3).Range.Copy
Set objDoc2 = objWord.Documents.Open(wordFile2)
With objWord.Selection.Find
.ClearFormatting
.Text = "Action Items:"
End With
If objWord.Selection.Find.Execute = True Then
objWord.Selection.GoTo What:=wdGoToLine, Which:=wdGoToNext, Count:=2
objWord.Selection.Paste
End If
objDoc1.Close SaveChanges:=wdSaveChanges
objDoc2.Close SaveChanges:=wdSaveChanges
objWord.Quit
MsgBox "Done..!"
Set objDoc1 = Nothing
Set objDoc2 = Nothing
Set objWord = Nothing
End Sub
Bookmarks