Originally Posted by
macropod
Yes, and the instructions in post 6 show how to do that.
If I am understanding correctly, those instructions don't change the background color for the entire cell, just the text background of the specified field, so that if there are other merge fields or text in the cell, it will only highlight the specified field and not the whole table cell.
I was able to conditionally shade the entire cell by running this VBA macro after the mail merge.
Sub color()
Dim r As Range, text As String, backgroundColor As WdColorIndex
Set r = ActiveDocument.Range
text = "TOXIN"
backgroundColor = wdGray25
With r.Find
Do While .Execute(FindText:=text, MatchWholeWord:=True, Forward:=True) = True
r.Cells(1).Shading.BackgroundPatternColorIndex = backgroundColor
Loop
End With
End Sub