![]() |
|
#2
|
||||
|
||||
|
Perhaps:
Code:
Sub TblHiLite()
Application.ScreenUpdating = False
Dim r As Long, h As Long, StrTitle As String
With Selection.Tables(1)
StrTitle = Split(.Cell(2, 1).Range.Text, vbCr)(0)
.Rows(2).Shading.BackgroundPatternColorIndex = 0
h = 0
For r = 3 To .Rows.Count
If Split(.Cell(r, 1).Range.Text, vbCr)(0) <> StrTitle Then
If h = 0 Then h = 3 Else h = 0
StrTitle = Split(.Cell(r, 1).Range.Text, vbCr)(0)
End If
.Rows(r).Shading.BackgroundPatternColorIndex = h
Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Macro to highlight a list of words
|
bakerkr | Word VBA | 4 | 10-19-2017 02:23 PM |
Word 2010 VBA Print Macro - Specified Sections
|
Benbon | Word VBA | 3 | 03-30-2017 02:31 PM |
Macro Question: Need help making a macro to highlight the first word in every sentence
|
LadyAna | Word | 1 | 12-06-2014 10:39 PM |
Macro to highlight words
|
bertietheblue | Word VBA | 9 | 07-01-2013 12:39 PM |
| find - reading highlight - highlight all / highlight doesn't stick when saved | bobk544 | Word | 3 | 04-15-2009 03:31 PM |