View Single Post
 
Old 08-03-2017, 03:35 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,359
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

Try:
Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
With ContentControl
  Select Case .Title
    Case "Rating"
      Select Case .Range.Text
        Case "Unsatisfactory": .Range.Cells(1).Shading.BackgroundPatternColor = 4739264
        Case "Satisfactory With Improvements Needed": .Range.Cells(1).Shading.BackgroundPatternColor = 5232127
        Case "Satisfactory": .Range.Cells(1).Shading.BackgroundPatternColor = 5880731
        Case Else: .Range.Cells(1).Shading.BackgroundPatternColorIndex = wdNoHighlight
      End Select
    Case "Risk"
      Select Case .Range.Text
        Case "High": .Range.Cells(1).Shading.BackgroundPatternColor = 4739264
        Case "Moderate": .Range.Cells(1).Shading.BackgroundPatternColor = 5232127
        Case "Low": .Range.Cells(1).Shading.BackgroundPatternColor = 5880731
        Case Else: .Range.Cells(1).Shading.BackgroundPatternColorIndex = wdNoHighlight
      End Select
    Case Else
  End Select
End With
End Sub
PS: Splitting your posts to a separate thread.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote