我正在寻找单词VBA脚本来隐藏具有灰色背景的表格单元格。 我的文件有很多表,因为有一些背景颜色的单元格,我需要隐藏这些单元格的内容......任何人都可以帮助我吗?
答案 0 :(得分:0)
selection.homekey wdstory
With Selection.find
.ClearFormatting
.Highlight = True
.Wrap = wdFindStop
Do While .Execute = True
If selection.range.HighlightColorIndex = wdgray25 and Selection.Information(wdWithInTable) = False Then
Selection.RANGE.font.Hidden = True
''Selection.RANGE.font.ColorIndex = wdWhite ''to hide the text content
''Selection.RANGE.HighlightColorIndex = wdAuto ''to remove the highlight
End If
selection.Collapse wdCollapseEnd
Loop
End With