【发布时间】:2020-11-18 22:03:48
【问题描述】:
我正在尝试将标题样式应用于文档中每个表格的 A1 表格单元格中的第一行文本。它不使用自动换行。
Dim CurrentTable As Table
Dim head1 As Style, head2 As Style, head3 As Style, head4 As Style
Set head1 = ActiveDocument.Styles("Heading 1")
Set head2 = ActiveDocument.Styles("Heading 2")
Set head3 = ActiveDocument.Styles("Heading 3")
Set head4 = ActiveDocument.Styles("Heading 4")
For Each CurrentTable In ActiveDocument.Tables
With CurrentTable.Cell(1, 1)
.Range.Style = head1
End With
【问题讨论】: