Cross reference a table caption below a repeated mapped content control
Hi!
I have a word template with multiple tables with table captions. The table content consists of xml-mapped content controls as plain text, where each row is a repeated section. Under each table there is a table caption.
The CustomXMLPart is updated by programmatically replace/update the xmlfile within the file structure.
When adding more rows to a table in the xml-file and opening the template it all looks fine. The table is expanded with the new information.
Lets say I have i cross reference to "Table 1" another place in the document.
When I hit Ctrl+a and F9 to update fields and cross references, the new rows added to the table disappears from the table, but gets added to the cross reference text instead.
After some investigation using vba, it seems that the Bookmark.Start value remains unchanged, and only the Bookmark.End value is reflecting the newly added content/document size.
Am I doing it all wrong?
before.PNG is how it looks before hitting F9, after.PNG is as you probably guessed after updating.
What can i do to keep it as shown in before.png?
|