Related Information Examples & Tutorials

Merge Documents

The Print menu option Merge Documents enables you to print reports and letters using externally defined report templates created in a third party word processing program.

There are two types of merged documents:

  • Mail Merge - using a data source file, such as CSV to provide data for the template
  • DDE - dynamically linking directly to Collect! to read data from fields.

Mail Merge

Using mail merge with Collect! is covered in the topic How To Mail Merge From Collect! To Word. This procedure results in a CSV file that may be used with a predefined template.

tip.gif To use the Merge Documents option, the template and CSV file must be located in a folder that you can navigate to. By default, Collect! expects these files to be stored in your working database's LETTERS folder.

Top of page.

DDE Letter Templates

Two DDE samples are included with the Collect! Demodb. These demonstrate using DDE ( Dynamic Data Exchange) to query Collect! directly to fill a report template created in a third party word processor.

To use DDE templates:

1. The CV11 Server must be up and running.

2. CV11 must be started with the command line startup option /z to enable DDE.

3. The DDE Template must be properly set up.

tip.gif Creating these templates is very easy. Please see the next section, Creating DDE Letter Templates.

Top of page.

Creating DDE Letter Templates

Using MS Word as an example, the following tips will help you create your DDE letter template.

tip.gif This requires that you are familiar with the report writer in Collect! and with the list of printable field codes. Each field has a UNIQUE identifier. (Such as, de.na, which refers to the Name field on the Debtor form.)

To view a complete list of UNIQUE IDENTIFIERS: Printable Field List

Adding DDE commands

In your template, you can simply type whatever information you want to print. Wherever you need to reference field data from Collect!, use the following steps.

1. In MS Word, with your document open, press CTRL+F9 to insert the { } symbol where you want to put the field data from Collect. This symbol is necessary for MS Word to recognize your DDE command.

tip.gif You must use CTRL+F9 to insert these brackets. If you use the brackets on your keyboard, MS Word will not recognize these as the DDE symbol.

2. Type, in between the brackets, the command (DDEAUTO) to query Collect! (collect query) to read the appropriate field.

Example:

{DDEAUTO collect query @de.na}
This command places the Debtor Name at this location in the report.

tip.gif You can format the field as well, using fonts and underlining or bold - whatever your word processor provides.

3. Continue to place fields from Collect! into your template, using CTRL+F9 to insert the DDE symbol and then typing {DDEAUTO collect query and the correct {field code} in between the brackets.

4. Save the document as a DOC file in your LETTERS folder.

Top of page.

Automatically Updating Fields

You may need to switch ON 'Update automatic links on Open' in the MS Word Tools, Options, General tab. This will automatically refresh the DDE template each time you open it using the Merge Documents option.

4. In Collect!, open the Debtor and select Print, Reports and Letters from the top menu bar. Then select Merged Documents from the list of reports and select the DDE *.doc that you want to print.

MS Word should open with your template populated with Collect! data and ready for printing.

tip.gif If you advance in Collect! to another debtor, some word processors will refresh the template with new data. Others require that you shut the word processing program before you select the next record for printing.

Top of page.

Summary

The Merge Documents feature enables you to print any predefined template you desire, using either Mail Merge or DDE templates. This is especially useful for legal or medical forms that you have already created and wish to start using in Collect!.

Top of page.

Was this page helpful? Do you have any comments on this document? Can we make it better? If so how may we improve this page.

Please click this link to send us your comments: helpinfo@collect.org