Version: 4.2.1 +
In this exercise we add an extra field to the document. You can practise working with Xml-data and mergefields.
- The Futurama Editor must be installed.
- Completing the tutorial Creating a Console Application first, is necessary:
The application built in this tutorial is used as a basis.
In the tutorial Creating a Console Application we have created an application that merges xml data into a Word document named SavingsTemplate.doc.
We now want to add an extra object 'Name' to the XML, and place this in the same document.
Therefore you need the following files to be able to start this assignment:
- The template-file: SavingsTemplate.doc
- The Futurama-application as built in the tutorial
- Create an extra element 'Name' in the XmlBuilder and give it the value 'Futurama user'.
- Create an extra line in the Template file beneath the header 'TestDocument', in which you add "Dear" and then a mergefield 'Name'.
- Check if your application now adds the name to your document, by executing the Action object in your application.
- Now check your application by executing the batch-file.
- The element 'Name' in the XmlBuilder should be a Fixed of type 'String'.
- Execute the Action by right-clicking the mouse --> Debug --> Execute
- Close the Template document before executing
You can download our solution for this assignment by clicking the image at the right. (Futurama 22.214.171.124)
Please note that you can very well have a different solution that is just as good as ours.
If you want some more practise on this subject, you could try the extra exercises below.
We won't provide a solution for these variations, just consider them as a way to further experiment with Futurama.
- (Easy:) Add another extra field to the document: The link "https://support.futurama.eu" should be placed at the bottom of the page.
- (Medium:) Add the location and name of the Template file to the resulting document, by using a reference in the XmlBuilder.