Hello,
TOC content is created by Word after you open a document because it's dynamic. If you use a Windows server you could run transformDocxUsingMSWord method that uses COM functions.
Or you could create a custom TOC using tables or lists. It won't be a real TOC but something similar.
Regards.