Screencasts - Hilfsvideos

Basic Word Merge Example

Created: 21 Okt. 2008 • Aktualisiert: 11 März 2009 | 2 Kommentare

Maschinelle Übersetzungen

das Bild der reecardos
0 0 Stimmen
Bitte loggen Sie sich ein, um abzustimmen

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:

NOTE: the 'a' for content above is just a placeholder, as the content property needs to be populated for this component; it will be overwritten in the merge.

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.

Kommentare KommentareZum neuesten Kommentar

das Bild der

Hi Reecardo,

have you ever seen issues with re-using a token twice in the same document?

We have a workflow that is basically writing a letter, with the token's [!firstname!] and [!surname!]

We use them both once in the address block, and then use the [!firstname!] as part of "Dear [!firstname!]"

The second time around it just writes the text, not the process variable that is mapped to the token, and doesn't seem to matter which token, the second instance always fails.

Any clues?



Bitte loggen Sie sich ein, um abzustimmen
das Bild der

FYI if anyone gets this same issue, the work around from Symantec support is to use mulitple input fields in the Word doc, and assign them both to the same Process Variable.

So in the above example letter, we use


Dear [!FirstName2!],

and map both [!FirstName!] & [!FirstName2!] to the FirstName process variable.



Bitte loggen Sie sich ein, um abzustimmen