|
我来个 抛砖引玉 吧!(楼主未说明是设置表格最小值还是固定值,自己决定。)
- Sub test()
- Dim i&
- Do
- i = i + 1
- Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Name:=i
- 'Sub 选定当前页() 'code by 守柔
- Dim CurrentPageStart As Long, CurrentPageEnd As Long
- Dim CurrentPage As Integer, Pages As Integer
- On Error Resume Next
- With Selection
- CurrentPage = .Information(wdActiveEndPageNumber)
- Pages = .Information(wdNumberOfPagesInDocument)
- CurrentPageStart = .GoTo(What:=wdGoToPage, Which:=wdGoToNext, Name:=CurrentPage).Start
- If CurrentPage = Pages Then
- CurrentPageEnd = ActiveDocument.Content.End
- Else
- CurrentPageEnd = .GoTo(What:=wdGoToPage, Which:=wdGoToNext, Name:=CurrentPage + 1).Start
- End If
- ActiveDocument.Range(CurrentPageStart, CurrentPageEnd).Select
- End With
- '
- Selection.Tables(1).Select
- '
- Selection.Rows.HeightRule = wdRowHeightAtLeast '最小值
- ' Selection.Rows.HeightRule = wdRowHeightExactly '固定值
- Selection.Rows.Height = CentimetersToPoints(0.9)
-
- Selection.Font.Name = "黑体"
- Selection.Font.Size = 14 '四号
- Selection.Font.Color = wdColorRed '红色
- Loop Until i = ActiveDocument.ComputeStatistics(wdStatisticPages)
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|