7,785
社区成员




Sub 宏4()
'
' 宏4 宏
'
'
Selection.MoveUp Unit:=wdLine, Count:=4, Extend:=wdExtend
Selection.MoveDown Unit:=wdLine, Count:=1, Extend:=wdExtend
Selection.Shading.Texture = wdTextureNone
Selection.Shading.ForegroundPatternColor = wdColorAutomatic
Selection.Shading.BackgroundPatternColor = -553582746
Selection.Font.Name = "黑体"
Selection.Tables(1).Style = "网格型浅色"
End Sub
接下来,写自己的宏,总体的思路就是遍历文档中左右的表格,然后把每个表格选中,再重复对单个表格干的事情。
Sub test()
Dim t As Table
For Each t In Application.ActiveDocument.Tables '遍历文档中所有表格
t.Select '把表格选中
'TODO:把单个表格操作录制的宏代码贴上来即可
DoEvents
Next
End Sub