Word - Table of Contents won't update

In my Word app I have a Table of Contents. It looks like this
It won't update with VBA code. (It did update previously, but now it doesn't)

Open in new window

I tried doing it manually. References > Table of Content ....
And No! It does not update!

I also did Ctl-A and F9
Still nothing!

Thanks for any help
Who is Participating?
GrahamSkanConnect With a Mentor RetiredCommented:
You can change the boolean value of the ShowFieldCodes  property/
ActiveWindow.View.ShowFieldCodes = True

Open in new window

Paul SauvéConnect With a Mentor RetiredCommented:
to switch between the field code & it's value, use Alt-F9

10 things you need to know about using Word fields
To toggle between the field code and its resulting value, select the entire field and press Shift + F9. To toggle all the fields in your document, press Alt + F9. So if you open a document and see field codes instead of results, simply press Alt + F9 to toggle them all.May 16, 2014
hindersalivaAuthor Commented:
Thanks Paul. That's it!

As I'm running the TOC update in code, how can I toggle the Alt-F9 in code - if it needs toggling?
Paul SauvéRetiredCommented:
how can I toggle the Alt-F9 in code
- sorry, i don't do VBA!

but unless you open the document, i don't think you can know if the fields are toggled on or off
hindersalivaAuthor Commented:
Thanks Graham.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.