I have list of colors:
and so on.
What I would like to do is apply shading to the paragraph text based on the text string, e.g. if text is wdColorBlue the paragraph should be shaded in that same color.
My code does not work, I'm stuck:
Dim oPar As Paragraph, Color As WdColor, strColor As String
For Each oPar In Selection.Paragraphs
strColor = (Left(oPar.Range.Text, Len(oPar.Range.Text) - 1))
Color = strColor
oPar.Range.Shading.BackgroundPatternColor = Color
I get a type mis-match at Color = strColor :-(