-
Word "Compile error: Method of data member not found"
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules