Basic Word Merge Example
I've created a simple workflow to demonstrate the Word Merge component. Follow along with these easy instructions.
The Add New Data Element component puts a variable on the stream that we want to merge. In my example, I created a user-defined type via an Integration Library called AddressLabel. It is a fairly simple type that consists of 5 text fields: name, street, city, state, and zip. I've assigned it the following values in my flow:
The Create Text File component puts a file type on the stream that will be used to store the "result" of the merge. I've assigned it the following values:
Now, the important part: the Word Merge component. I've previously created a Word document that will be used as the template for my merge. I called it C:\AddressLabelExample.doc, and it looks like this:
Notice the square brackets/exclamation points; this is how the Word Merge component identifies "tokens" to populate in the merge.
In the Word Merge component, click the ellipsis button by Document to Merge. Browse to your template file (C:\AddressLabelExample.doc above, in my example). For Output Variable Name, select MyFile (previously introduced by the Create Text File component).
Now, click the ellipsis button for Mapping For Merge. An editor should pop up like this:
Through this editor, we'll map the fields of the AddressLabel for our merge. For each field, click the ellipsis button for Map to Field and select the appropriate property of our AddressLabel; when you're done, you should have something that looks like this:
And we're all done with the Word Merge component!
The Write File component saves the results of the merge to a file. I've assigned it the following values:
Execute your workflow, and look for C:\myfile.doc in Windows Explorer. The file should be the result of your merge.








