How to add color to index entries in a Word File

Copper Contributor

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 read the text or found easily to check the index entry.

Thanks ahead for any help.

8 Replies

Sorry, it is not possible, using any feature built into Word, to add different colors to different index entries.

OK, thanks for your input regardless!

You are welcome.

You can, of course, manually apply such colors in a finished index. That is really not something I would want to contemplate, though.

Yes, that I know, but since I literally have thousands of them, that is not something which is practical.
It's interesting as I followed up on this.

So if you color the individual entry in the text, that works and the corresponding entry in the index shows up with the new color!

BUT, if you color the entries in the index, none of the corresponding entries in the text shows up in the new color....
That is because the Index is created using the individual entries. There is no link from the index back to those entries. Changes made in the Index are lost next time it is updated.
Coloring the individual entries is ingenious, even though that will also be a lot of work.


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
            Selection.Font.ColorIndex = wdRed
        End If
    Next oFld
    For Each oIdx In ActiveDocument.Indexes
    Next oIdx
End Sub
Awesome! Thanks!