I'm using .docx files with content controls with the OpenDoPE Add-In to generate Word templates that get filled from our applications. The conversion process then looks at the "template", injects a different custom XML for the data binding and regenerates the docx. This Word document is then automatically placed in an ECM system, that generates a preview version of the Word document.
And here is the problem: the preview version seems to get rendered out of the original content, not out of the content that should be there regarding the reinjected XML data, but out of the data that was originally in the XML file and therefore in the template. I cannot imagine why this happens, since when I open the document with Word, I see the correct data inserted. And when I save this file on a different location using Word "Save As...", and insert this file into the ECM system, the preview is rendered correctly.
What is wrong here? Am I missing some steps that are necessary when transforming the file? I'm using these lines of code to transform the Word document:
- Code: Select all
OpenDoPEHandler openDopeHandler = new OpenDoPEHandler(wordMLPackage);
OpenDoPEIntegrity openDopeIntegrity = new OpenDoPEIntegrity();
Any help is appreciated!