WORD批量加入表格标题(转载)

Sub macro1()
'
'
If ActiveDocument.Tables.Count >= 1 Then
   Set act_Doc = ActiveDocument
       For Each otable In act_Doc.Tables
            CaptionLabels.Add Name:="表格"
       With otable.Range.InsertCaption(Label:="表格", Position:=wdCaptionPositionAbove)
           'Position:=wdCaptionPositionBelow
       End With
    Next
End If

End Sub

猜你喜欢

转载自elaine0111.iteye.com/blog/1705118