Sub 批量指定某一表格内容()
Dim wd As Object, doc As Object, myPath$, fileName$
Set wd = CreateObject("word.Application")
myPath = ThisWorkbook.Path & ""
fileName = Dir(myPath & "*.doc*")
Do While fileName <> ""
Set doc = wd.Documents.Open(myPath & fileName)
doc.tables(1).Cell(14, 3).Range.Text = "A" 'A为用来替换的值
doc.Close True
fileName = Dir
Loop
wd.Quit
Set wd = Nothing
MsgBox "Word 文件修改完成!", 0 + 48 + 256 + 0, "提示:"
End Sub
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交