Hey folks
I've got here some documents generated using OpenXML SDK (2.0/2.5, same behavior). I've tried both MS Word 2010/2013, also same behavior.
Now, I've got a TOC in the document which needs to be refreshed when the document opens. I use the 'UpdateFieldsOnOpen' flag to make Word ask the user to refresh his document. I then click 'yes, you may refresh'.
-> Result = a partially refreshed TOC.
Why partially? Well ... Content of the document is databound to a custom XML datasource using content controls. TOC at this point refuses to show the databound text, but instead shows the default text of the content control (which isn't really helpful).
Now ... when I then manually refresh the TOC, then it does show me everything as it's supposed to be shown.
Strange thing is that when the application was first made Word DID refresh that properly on document opening, so I'm at a loss as to why it's no longer doing so now. Maybe I'm missing something?
Any thoughts would be welcome.