Word表格宏处理
Sub 设置Word表格()
'选择表格宽度100%
Selection.Tables(1).PreferredWidthType = wdPreferredWidthPercent
Selection.Tables(1).PreferredWidth = 100
'选择表第一行
Selection.Tables(1).Rows(1).Select
'重复标题行
Selection.Rows.HeadingFormat = wdToggle
'行高设置为0.8厘米
Selection.Rows.HeightRule = wdRowHeightAtLeast
Selection.Rows.Height = CentimetersToPoints(0.8)
'
'选择行底纹
Selection.Shading.Texture = wdTextureNone
Selection.Shading.ForegroundPatternColor = wdColorAutomatic
Selection.Shading.BackgroundPatternColor = -603917569
End Sub