Hi

I've just added the following code to my word document to change the colour and highlighting of selections in my drop down list. However, when I try to save the document I get the error "Comile error: Method of data member not found". The line it highlights is the first in the below code:

Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
With ContentControl
If ContentControl.Title = "Test" Then
Select Case .Range.Text
Case "Blue"
.Font.Color = wdColorBlue
.Font.Underline
.Shading.BackgroundPatternColor = wdColorAutomatic
Case Else
.Font.Color = wdColorBlack
.Shading.BackgroundPatternColor = wdColorYellow
End Select
End If
End With
End Sub