Forum Discussion
jellow1155
Jun 13, 2023Copper Contributor
How to add color to index entries in a Word File
My book has an index, but when "Show" is toggled, it is hard to read the text with so many index entries. I am hoping it is possible to color the index entries so that they can either be ignored to r...
Jay Freedman
Jul 13, 2023Brass Contributor
Coloring all the entries doesn't have to be a lot of work. Just run this macro:
Sub Color_Index()
Dim oFld As Field
Dim oIdx As Index
For Each oFld In ActiveDocument.Fields
If oFld.Type = wdFieldIndexEntry Then
oFld.Code.Select
Selection.Font.ColorIndex = wdRed
End If
Next oFld
For Each oIdx In ActiveDocument.Indexes
oIdx.Update
Next oIdx
End Subjellow1155
Jul 13, 2023Copper Contributor
Awesome! Thanks!