Purpose Generate a Word document with multiple parts We want to create a Word document which consists of multiple parts. If the number of parts depends on the data read (e.g. customers, projects,...), we cannot work with a single rtf template. An alternative to the solution described here is to generate the document via Word automation, but the required coding will then become more complicated. |
Solution
1. Placeholder file "&[rtfinclude.###].rtf&q"
Start with a document that contains all fixed parts such as a header, footer, title, page count,... Then insert a table with one row, one column and add a link to the placeholder file in the table cell. This is done as follows:
Click on Insert -> Object -> Text from file. Then select the placeholder file and choose "Insert as Link":
The master template now looks as follows:
Save the file as "mastertemplate.rtf".
3. Sales office file Result ............................................................. .......................................................................................
|
InputScript We read the customer orders directly from the database tables VBAK and KNA1 via the function /GUIXT/dbselect. GuiXT
Components InputAssistant |