word 表格居中

Sub SetTableCenter()
    Dim doc As Document, myTable As table
    Set doc = ActiveDocument
    If doc.Tables.Count = 0 Then Exit Sub
    For Each myTable In doc.Tables
            myTable.Range.Rows.Alignment = wdAlignRowCenter
    Next
End Sub

 

posted on 2022-01-19 14:37  编程007  阅读(51)  评论(0)    收藏  举报