Creating a Data Source File

In order to create a new Word template containing merge fields, or to add additional merge fields to an existing template, you first need to create a data source file. When the data source file is linked to the template, you can insert merge fields that will be replaced with data in mail merged documents.

To create a data source file, follow the instructions below:

  1. Access the table from which the data source file is to be generated (e.g. a table of member/tenant accounts).

    Important! In NewViews for Non-profit Housing, data source files that will be used to create/modify templates for RGI notices must be generated from the correct view of member/tenant accounts, using the custom script nph_rgi_notice_merge.qw_script. For more information on RGI views used for mail merge, see Merge Fields Associated with RGI Views.

  2. Position on an item in the table (e.g. a member/tenant account).

  3. Issue the Tools>Mail Merge>Item command.

    The Mail Merge Settings prompt will appear.

  4. In the prompt, leave the Main Document (line 1) blank.

  5. Enter the name of the Data File (extension .txt) that you will link to the Word template.

    Make note of the name and location of this file. You will need to specify it when you want to insert merge fields into a template.

    If the file does not exist, NewViews will create it. If the file already exists, it will be overwritten.

  6. Set the Destination to display.

  7. If the data source file is to be used to create a template for an RGI notice, the Custom Script must be set to nph_rgi_notice_merge.qw_script.

    Press <F3> to find and select this script. NewViews scripts can generally be found in the directory c:/nv2_nph/nv2.dat/scripts (where nv2_nph is the directory in which NewViews is installed). If NewViews is installed in a directory other than nv2_nph, substitute the name of that directory in the path.

  8. Click Continue or press <F5> to proceed.

    When you receive the warning Main Document is not specified, click Continue.

Three files are created as a result of this operation. The names of these files are determined by the name specified as the Data File in the Mail Merge Settings prompt.

For example, if the name of the data file was annual_eligibility_review.txt, the three files that are created would be:

Mail Merge Files
1
annual_eligibility_review.txt
A complete data source file.
2
annual_eligibility_review_readable_field_list.txt
A list of the available fields. The information in this file can be used as a guide when creating or modifying your template.
3
annual_eligibility_review_readable_data_records.txt
In addition to showing you the available fields, this file also shows you the output from the fields.

Sample Readable Field List Document

Below is an example of a readable field list file (e.g. annual_eligibility_review_readable_field_list.txt) that has been opened using Windows Notepad.

Viewing or printing this list is a handy way to know which merge fields will be available to choose from when you link the corresponding data source file to a Word template.


Copyright (c) 2003-2022 Q.W.Page Associates Inc., All Rights Reserved.