View Single Post
 
Old 10-13-2022, 06:25 PM
rperrett rperrett is offline Mac OS X Office 2016 for Mac
Novice
 
Join Date: Oct 2022
Posts: 2
rperrett is on a distinguished road
Default Search with dropdown fields on Word for Mac

Hi there, I'm hoping you can help as I have got stuck with what I think may be a Mac issue but I'm not sure.

I am trying to change the colour of the text in a dropdown based on its selected value. My code below works to change all fields green, however I am unable to figure out how to reference the currently selected value in order to search/filter on text values. The object .DropDown doesn't seem to exist which has me confused.

The fields were created in Word for Mac by using the Developer menu in the ribbon - Insert Combobox. What is the difference between a combobox and dropdown box?

Code:
Dim oFld As Field
For Each oFld In ActiveDocument.Fields
   If oFld.Type = wdFieldFormDropDown Then
       oFld.Code.Font.ColorIndex = wdGreen
   End If
Next oFld
Reply With Quote