Group:  Microsoft Word ยป microsoft.public.word.vba.general
Thread: How to change field result font color using VBA?

How to change field result font color using VBA?
jmo 12/30/2008 5:08:03 PM
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,
Re: How to change field result font color using VBA?
"Lisa" <lisa[ at ]discussions.microsoft.coom> 12/30/2008 11:00:15 PM
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



"jmo" <jmo[ at ]discussions.microsoft.com> schrieb im Newsbeitrag
news:6B002ECB-C5DB-4A36-AC46-0DE3D02F3615[ at ]microsoft.com...
[Quoted Text]
> 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,


Home | Search | Terms | Imprint
Newsgroups Reader