Word doesn't display page numbering or table of contents, just a code

If Word doesn't display page numbering and/or table of contents, try pressing Alt+F9 to change from field codes to the actual value.

 

FAQ Image

This article helped me!