How to change field result font color using VBA?

J

jmo

What code do I need to change the field result's font color when I update the
fields?

I want to change all field results to red and don't what code to use to
find all fields & change their font color.


Thanks,
 
L

Lisa

I haven't tested it but you could try the following?

Lisa


Sub FormatEachField()

' to put in red all the fields

Dim wrdField As Field

For Each wrdField In ActiveDocument.Fields
wrdField.Select
With Selection.Font
.Color = wdColorRed
End With
Next wrdField

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top