I want to loop through my word document removing all backgroundcolors on each word. This is my code so far but it is not working – I get the following error message “Argument not optional” and “.Item” is highlighted:
Sub ResetColor()
Dim doc As Document
Set doc = ActiveDocument
Set eword = doc.Range.Words.Item
For i = 1 To doc.Range.Words
eword.Shading.Texture = wdTextureNone
eword.Shading.ForegroundPatternColor = wdColorAutomatic
eword.Shading.BackgroundPatternColor = wdColorAutomatic
Next
End Sub
Try this: