Reference: The Merge toolbar and programming commands
The Merge toolbar displays at the top of the document window when you create a form document or a data file for a merge. You can control a merge and edit merge files by using the Merge toolbar.
You can also control a merge by using merge programming commands. The merge commands are similar to codes used in computer programming languages. For example, you need to specify parameters for some commands, and you can create subroutines, a set of commands that can be repeated in a merge.
Using the Merge toolbar |
When you create a form document or a data file for a merge, the Merge toolbar displays at the top of the document window.
This is the Merge toolbar.
You can control a merge and perform specific merge functions by using the Merge toolbar. The Merge toolbar is context-sensitive, which means that the buttons available on the Merge toolbar change according to the task you are performing. For example, you would see different buttons for performing a keyboard merge and for editing a data table file.
You cannot hide the Merge toolbar for a merge form document or merge data file. If it is not visible, then the active file is not a form document or a merge data file.
Prompting for user input and message display |
Several commands are used to display a message for, or request information from, the person running the merge. You can use a message to inform the user of the progress of the merge or you can use a prompt to remind the user of the kind of information needed in a fill-in form.
The following table lists commands displaying a message or prompt and shows how they differ from each other:
Reusing commands with subroutines |
You can create a subroutine to call a set of commands which are repeated several times in a merge. You do not need to add them each time. You can add them once, label them as a subroutine, then return to them (or call them) each time you want them to run.
The three commands used to define and call a subroutine are described in the following table.
Using multiple files and macros in a merge |
A merge can consist of more than one data file or form file, and it can include multiple macros. This may be useful if you want to merge different documents with the same data or if you have multiple data sources to merge. There are three ways to connect merge files: nesting, chaining, and substituting.
Nesting
Nesting a file or macro is like calling a subroutine. The merge pauses while the nested file or macro runs, then continues after the nested file has finished. This is useful if you use certain procedures frequently in your merges because you can save them in smaller files.
You can have multiple levels of nesting. A merge file can nest a second file or macro, which in turn nests another file, and so on. The three nest commands are described in the following table.
Chaining
Chaining another file or macro starts that file or macro when the original merge is finished. This is one way to run multiple merges one after the other instead of starting each one manually. Only one chain command is used in a merge file; if there are more than one, the last one is used. The three chain commands are described in the following table.
Substituting
Substituting another form or data file is another way to change from one merge file to another. However, a substitute command moves the merge immediately to the second file without finishing the original merge file. When this happens, the new merge does not return to the original merge. The two substitute commands are described in the following table.
Understanding merge code parameters |
Most merge programming codes use parameters (also called arguments). In the following table, parameters are enclosed in parentheses and any optional parameters are enclosed in square brackets. When there are two or more parameters, they are separated with a semicolon.
Merge code parameters
You need to enter the correct parameters and arguments as required for the merge code. The following table lists parameters and their arguments.