‎2018 Oct 23 12:00 PM
Hi SCN,
I've a word template with content control. My goal is to generate the word document with data from SAP.
I've seen the blog: Generating Microsoft Word Doc with dynamic data and other documentation.
Already did the dowload of the Microsoft Word Content Control Tool Kit from http://dbe.codeplex.com/.
How to install the content control toolkit (to bind content controls to the custom XML part)?
Thanks.
Maria João Rocha
‎2018 Oct 24 1:34 AM
idk about the approach you talked about but i can suggest you a difference way: using BDS with mail merge interface ( sample program SAPRDEMO_MAILMERGE_INTERFACE ) or form interface ( SAPRDEMO_FORM_INTERFACE ).
‎2018 Oct 24 10:35 AM
Thanks Manh,
I tried that approach as you can see Desktop Office Integration word form.
The word template has not form fields neither merge fields. The document is based on content control fields and can't be changed (it's from other company/institute).
Our task is to fill automatically the word with data from SAP .
Regards,
Maria João rocha
‎2018 Oct 25 1:43 AM
you may read this blog series, it also have mapping for content control, and as it based on OOXML, you can do more than just binding field:
https://blogs.sap.com/2017/04/24/openxml-in-word-processing-custom-xml-part-mapping-structured-data/
There is also have document builder, but it may be more complex than OOXML:
https://wiki.scn.sap.com/wiki/display/DocBuilder/Content+Controls+-+Mapping+Variables
‎2018 Oct 26 9:54 AM
Hi,
Thanks again.
I'm on Netwaver 7.00, without class CL_DOCX_FORM, but luckily in short term we will move to 7.02 🙂
I'm gona wait for this version.
Regards.
Maria João Rocha
‎2018 Nov 19 10:20 AM
Hi,
Thanks. I must use word content control. The word document comes from outside, we can't changed it.
Regards,
Maria João Rocha
‎2018 Nov 20 2:32 AM
its may be more complicate if you dont have those class, as you see docx is zipped from various xml file so incase you dont have cl_docx_form, you might try to build your own xml files and combine it using transformation. based on the link i sent you, its quite clear how to map custom xml file to docx. did you have 7.02 yet?
‎2018 Dec 14 12:25 PM
Hi,
On SAP Netweaver 7.02 already with CL_DOCX_FORM and it works :).
1 - Mapping custom XML manually. Developer Tab–>XML Mapping Pane
(https://blogs.sap.com/2017/04/24/openxml-in-word-processing-custom-xml-part-mapping-flat-data/)
2 - Used example program (ZDOCX_DOCUMENT) to format the content control fields.
Thanks. Regards.
Maria João Rocha