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...
jellow1155
Jun 13, 2023Copper Contributor
OK, thanks for your input regardless!
Charles_Kenyon
Jun 13, 2023Bronze Contributor
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.
- jellow1155Jul 11, 2023Copper ContributorIt'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....- Charles_KenyonJul 13, 2023Bronze ContributorThat 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.- Jay FreedmanJul 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 Sub
- jellow1155Jun 14, 2023Copper ContributorYes, that I know, but since I literally have thousands of them, that is not something which is practical.