I have a document with two textboxes, one linked to the other. Inspecting the contents using the DOM (or OpenXML for that matter) shows all of the text in one of the boxes. However, at runtime Word is flowing some of the text over to the linked textbox. My goal is to extract the text from each textbox separately, as it would be rendered on the page. Is this possible?
I’ve gotten as far as using a LayoutCollector and LayoutEnumerator to determine the position on the page of each paragraph contained within the populated textbox, and it appears that I can compare that against the position/size of the textbox shapes. This feels brittle though, so I’m wondering if there is a better way.
Does the text property of a linked textbox ever get populated after layout is done? Or is it just overlaid over the linked textbox at render time, even though the other textbox “owns” that text from a DOM point of view?