Sub ChangeTable()

Application.Browser.Target = wdBrowseTable

    For i = 1 To ActiveDocument.Tables.Count

        ActiveDocument.Tables.Item(i).Select

        With Selection
    
            '表格外边框
            .Borders.OutsideLineStyle = wdLineStyleSingle
            '表格内边框
            .Borders.InsideLineStyle = wdLineStyleSingle
            '表格内边框
            .Borders(wdBorderRight).Color = wdColorAutomatic
            .Borders(wdBorderLeft).Color = wdColorAutomatic
            .Borders(wdBorderTop).Color = wdColorAutomatic
            .Borders(wdBorderBottom).Color = wdColorAutomatic
            '表格居中
            .Rows.Alignment = wdAlignRowLeft
            '表格内容居中
            .Range.Paragraphs.Alignment = wdAlignParagraphLeft
            
        End With
    
    Next i

End Sub

 

相关链接:http://blog.chinaunix.net/uid-20423564-id-1949478.html

相关文章:

  • 2021-12-26
  • 2021-11-20
  • 2021-05-21
  • 2022-02-11
  • 2022-01-23
  • 2021-06-29
  • 2021-11-23
猜你喜欢
  • 2021-08-01
  • 2022-01-12
  • 2021-12-05
  • 2022-12-23
  • 2022-01-01
  • 2021-12-08
  • 2022-12-23
相关资源
相似解决方案