I am working adding a field to a document and adding shading. The following code is not working.
With Selection
.Range.Font.Shading.BackgroundPatternColor = wdColorLightYellow
.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
PreserveFormatting:=False, Text:="Page"
.Fields.Update
End With
'ActiveDocument.Fields(1).Select
'Selection.Range.Font.Shading.BackgroundPatternColor = wdColorLightYellow
The commented-out lines will add the shading to the first field in the document.