Sub 汇总()
Application.ScreenUpdating = False
Set wd = CreateObject("word.application")
p = "c:\test\"'word文件目录,根据实际修改
f = Dir(p & "*.doc*")'
r = 1
Do
r = r + 1
Set d = wd.documents.Open(p & f)
With d.tables(1)
Cells(r, 1) = .cell(2, 4).Range.Text '将word文档第一个表格第2行第4列的数据存入当前工作表的A列
End With
d.Close
f = Dir
Loop Until f = ""
wd.Quit
Set wd = Nothing
Application.ScreenUpdating = True
End Sub
Application.ScreenUpdating = False
Set wd = CreateObject("word.application")
p = "c:\test\"'word文件目录,根据实际修改
f = Dir(p & "*.doc*")'
r = 1
Do
r = r + 1
Set d = wd.documents.Open(p & f)
With d.tables(1)
Cells(r, 1) = .cell(2, 4).Range.Text '将word文档第一个表格第2行第4列的数据存入当前工作表的A列
End With
d.Close
f = Dir
Loop Until f = ""
wd.Quit
Set wd = Nothing
Application.ScreenUpdating = True
End Sub