View Single Post
 
Old 03-06-2018, 01:53 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You might try giving Word some breathing space for its own housekeeping:
Code:
Sub Grey()
Application.ScreenUpdating = False
Dim Tbl As Table, Cll As Cell, i As Long
For Each Tbl In ActiveDocument.Tables
  For Each Cll In Tbl.Range.Cells
    i = i + 1: If i Mod 500 = 0 Then DoEvents
    With Cll
      If Split(.Range.Text, vbCr)(0) = "-1" Then
        .Shading.BackgroundPatternColor = wdColorGray10
        .Range.Text = ""
      End If
    End With
  Next
Next
Set Cll = Nothing: Set Tbl = Nothing
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote