在MS Word

时间:2017-05-19 16:49:30

标签: ms-word word-vba

所以我想出了如何在MS word中引用和隐藏表格中的一组行。但是,有没有办法隐藏单个单元格。下面是我隐藏行的代码:

 Private Sub CommandButton1_Click()

   Dim BBGEarlyAppr As Range
   Dim BBGEarlyAppr2 As Range
      With ActiveDocument.Tables(1)
          Set BBGEarlyAppr = .Rows(7).Range
          BBGEarlyAppr.End = .Rows(41).Range.End
      End With

      With ActiveDocument.Tables(1)
          Set BBGEarlyAppr2 = .Rows(60).Range
          BBGEarlyAppr2.End = .Rows(68).Range.End
       End With

      With BBGEarlyAppr.Font
           .Hidden = True
      End With
      With BBGEarlyAppr2.Font
          .Hidden = True
      End With
  End Sub

0 个答案:

没有答案