For Each aTable In Selection.Tables
aTable.Range.Select
Selection.Font.Size = 10
Selection.Rows.Height = 17.01
With Selection.ParagraphFormat
.SpaceBefore = 0
.SpaceBeforeAuto = False
.SpaceAfter = 0
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceSingle
.FirstLineIndent = CentimetersToPoints(0)
.CharacterUnitFirstLineIndent = 0
.LineUnitBefore = 0
.LineUnitAfter = 0
.WordWrap = True
End With
Next
我通过如上代码调整表格格式,有两个问题:
1、为什么第一次执行后with里面的代码都不能正确执行,然后再执行一次就全部都正确了?
2、如何设置字号为5号字?我通过宏录制,代码显示是10,但是执行完后,字号直接就是10了,而10和五号字好像还有点区别。