![]() |
|
#1
|
||||
|
||||
![]() For dropdown formfields, you could employ a macro like: Code:
Sub ColorDropDown() Dim sText As String, oFld As FormField Const Pwd As String = "" With ActiveDocument Set oFld = Selection.FormFields(1) sText = oFld.Result If .ProtectionType <> wdNoProtection Then .Unprotect Password:=Pwd With oFld.Range Select Case sText Case Is = "Bad" .Font.Color = wdColorRed Case Is = "Poor" .Font.Color = wdColorOrange Case Is = "Fair" .Font.Color = wdColorYellow Case Is = "Good" .Font.Color = wdColorGreen Case Is = "Excellent" .Font.Color = wdColorBlue Case Is = "Outstanging" .Font.Color = wdColorIndigo Case Else .Font.Color = wdColorBlack End Select End With .Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=Pwd End With End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
marksm33 | Word VBA | 3 | 01-15-2015 07:55 PM |
![]() |
alidaanish | Word | 1 | 01-10-2014 10:44 PM |
![]() |
BoringDavid | Word VBA | 12 | 12-12-2013 05:14 AM |
Display paragraph of text based on value selected in combo | WordWaza | Word | 0 | 08-09-2013 06:30 AM |
Bold list items in a combo box | DrewB | Word VBA | 0 | 07-17-2009 11:32 AM |