Try the following
Excel macro:
Code:
Sub GetWordTableData()
'Note: this code requires a reference to the Word object model
Application.ScreenUpdating = False
Dim wdApp As New Word.Application
Dim wdDoc As Word.Document
Dim wdTbl As Word.Table
Dim wdRng As Word.Range
Dim strFolder As String, strFile As String
Dim WkSht As Worksheet, i As Long, j As Long
strFolder = GetFolder
If strFolder = "" Then Exit Sub
Set WkSht = ActiveSheet
i = WkSht.Cells(WkSht.Rows.Count, 1).End(xlUp).Row
strFile = Dir(strFolder & "\*.docx", vbNormal)
While strFile <> ""
i = i + 1
Set wdDoc = wdApp.Documents.Open(Filename:=strFolder & "\" & strFile, _
AddToRecentFiles:=False, Visible:=False)
With wdDoc
For j = 1 To 3
With .Tables(1)
Set wdRng = .Cell(2, j).Range
With wdRng
.End = .End - 1
WkSht.Cells(i, j).Value = .Text
End With
End With
With .Tables(2)
Set wdRng = .Cell(2, j).Range
With wdRng
.End = .End - 1
WkSht.Cells(i, j + 3).Value = .Text
End With
End With
Next
End With
wdDoc.Close SaveChanges:=False
strFile = Dir()
Wend
wdApp.Quit
Set wdDoc = Nothing: Set wdApp = Nothing: Set WkSht = Nothing
Application.ScreenUpdating = True
End Sub
Function GetFolder() As String
Dim oFolder As Object
GetFolder = ""
Set oFolder = CreateObject("Shell.Application").BrowseForFolder(0, "Choose a folder", 0)
If (Not oFolder Is Nothing) Then GetFolder = oFolder.Items.Item.Path
Set oFolder = Nothing
End Function
Note: When you add the macro to Excel, you must set a reference to the Word object model in the VBE, via Tools>References. The macro includes its own folder browser, so all you need to do is run the macro and use the browser to select the folder to process. That folder must not contain any documents that you don't want to process.