For example:
For Each CCtrl In ActiveDocument.ContentControls
With CCtrl
If IsNumeric(.Tag) Then
Select Case .Range.Text
Case "NEDODÁNO": .Range.Cells(1).Shading.BackgroundPatternColor = 5263615
Case "DODÁNO": .Range.Cells(1).Shading.BackgroundPatternColor = -704577537
Case "SKOPAL": .Range.Cells(1).Shading.BackgroundPatternColor = -704577537
Case "VYBER": .Range.Cells(1).Shading.BackgroundPatternColor = wdColorBlack
End Select
End If
End With
Next
Conversely, if you're using a ContentControlOnExit macro to update the current cell, you could use:
Private Sub Document_ContentControlOnExit(ByVal CCtrl As ContentControl, Cancel As Boolean)
Application.ScreenUpdating = False
With CCtrl
If IsNumeric(.Tag) Then
Select Case .Range.Text
Case "NEDODÁNO": .Range.Cells(1).Shading.BackgroundPatternColor = 5263615
Case "DODÁNO": .Range.Cells(1).Shading.BackgroundPatternColor = -704577537
Case "SKOPAL": .Range.Cells(1).Shading.BackgroundPatternColor = -704577537
Case "VYBER": .Range.Cells(1).Shading.BackgroundPatternColor = wdColorBlack
End Select
End If
End With
Application.ScreenUpdating = True
End Sub