改表格的序号和单元格,你没有问题吧?
ActiveDocument.Tables(1).Cell(3, 3).Select
Selection.Copy
ActiveDocument.Tables(1).Cell(2, 2).Paste
ActiveDocument.Range(ActiveDocument.Paragraphs(1).Range.Start, ActiveDocument.Paragraphs(1).Range.Start).Select
Selection.PasteAndFormat wdFormatPlainText
解释:
Tables(1)取第一个表格,改数字为要取的表格
Cell(3, 3)取第3行第3列,改数字为要取的小格
Selection.Copy复制到剪贴板,
在第一个表格的第2行第2列粘贴
在本文档的第一个段落前粘贴 文本
楼上的代码不错,但是有几个细节好像有问题,我修改了一下:
Sub dyg()
ActiveDocument.Tables(1).Cell(3, 3).Select
Selection.Copy
ActiveDocument.Tables(1).Cell(2, 2).Select
Selection.Paste
ActiveDocument.Range(ActiveDocument.Paragraphs(1).Range.Start, ActiveDocument.Paragraphs(1).Range.Start).Select
Selection.PasteAndFormat(wdFormatPlainText)
End Sub
二楼的,请问如何知道是第几个表格?