Sub 读文件所有文件()
Dim wordapp, wordD
Dim cPath$, cFile$, i%
'cPath = ThisWorkbook.Path & "\" cPath = ThisWorkbook.Path & "\1" cFile = Dir(cPath & "\*.doc?")
Set wordapp = CreateObject("word.Application")
Do While cFile <> ""
Set wordD = wordapp.Documents.Open(cPath & "\" & cFile)
i = i + 1
MsgBox wordD.Tables(1).Cell(4, 9) ' = "/"
wordD.Close
cFile = Dir
Loop
Set wordD = Nothing
wordapp.Quit
End Sub
联系客服