Dim i As Integer For i = 1 To Selection.Tables.Count Selection.Tables(i).Columns(9).Delete Selection.Tables(i).AutoFitBehavior (wdAutoFitContent) Selection.Tables(i).AutoFitBehavior (wdAutoFitContent) Next End Sub 上面宏的作用是遍历选中内容中的所有表格,把所有表格的…
不解释,直接上代码... Sub 删除表格列WT0818() '此符号是注释 ' 删除表格列WT0818 宏 ' For Each tb In ActiveDocument.Tables //word文件中的表格集合 For r = tb.Rows.Count To 1 Step -1 'tb.Rows(r).Delete //删除指定的行 If InStr(tb.Cell(r, 3), "char") > 0 Then tb.Cell(r, 3) = Replace(tb.…
Alt+F11,然后插入-模块: 复制下面代码到编辑窗口: Sub 半角标点符号转换为全角标点符号() '中英互译文档中将中文段落中的英文标点符号替换为中文标点符号 Dim i As Paragraph, ChineseInterpunction() As Variant, EnglishInterpunction() As Variant Dim MyRange As Range, N As Byte '定义一个中文标点的数组对象 ChineseInterpunction = Array(".…