Word Document Interface
caution
Beginning with NLS 5.13, changes were made in the way mail merge documents are processed by NLS. Please test all existing Microsoft Word mail merge documents when upgrading to NLS 5.13 and later to ensure that all the merge fields in the document are being processed correctly.You can create your own NLS reports and statements using Mail Merge features in Microsoft Word. Contact and loan data tags may be embedded in a Word document using the MERGEFIELD
command.
Begin by creating a new document in Microsoft Word. Data to be taken from NLS can be added by pressing Ctrl-F9 to enter the merge braces {}
. Enter the MERGEFIELD
command followed by the field name of the data you wish to add (e.g. {MERGEFIELD cifnumber}
would place the Contact Number into the Word document when run). Once the form letter has been created as a Word document, install the form letter as a report in the NLS database using the NLS Report Manager.
Note
You must press Ctrl-F9 to create a merge field. Entering the curly braces manually does not create a valid merge field.Once the report is installed, you can run the report in either of two ways:
From the Contact screen, you can run it as an individual report and it will automatically insert the proper contact data from your database into the report.
From the Reports screen, you can run the report as a Multi-Merge Report. The report will be generated with the appropriate information for each contact selected by the parameters that are chosen on the Reports screen.
Creating a Form Letter
To create a form letter for use as an NLS report, you will create a document in Microsoft Word using the Mail Merge features.
Any computer from which you intend to run this report must have all necessary fonts installed. If you use a font in the document, which is not installed on the computer that runs the report, Microsoft Word will substitute another font, and this may alter the format of your report.
The exact procedure may vary depending on the version of Microsoft Word being used.
To create the Word document, first launch Microsoft Word.
Select the menu File > New….
Click Blank Document.
Now, edit your Word document. To insert a Merge Field, press Ctrl-F9 to enter the merge braces {}
. Enter the MERGEFIELD
command followed by the field name of the data you wish to add. Word has a maximum limit of 63 unique fields per document.
Once the document is complete, save it to an appropriate location.
Next, you will install the form letter as a report in your NLS database.
You can toggle your document to view or hide the merge fields using Alt-F9.
If you need to access a database element that is not available on the pre-set list of merge fields, you can query the database directly using an SQL query in conjunction with the COMMENTS
command. The syntax is as follows, using Ctrl-F9 to insert the COMMENTS
within the merge field:
{MERGEFIELD fieldname {COMMENTS "sql query"}}
Example
{MERGEFIELD nls_noteamt {COMMENTS "select original_note_amount from loanacct where acctrefno = nls_active_acctrefno"}}
The field name must always begin with nls_
.
For the argument of the where clause in the SQL query use nls_active_acctrefno
for loan reports and statements, or use nls_active_cifno
for contact reports.
For a list of the fields that are available as predefined merge fields for contact reports, loan reports, or statements, see Merge Fields.
Note
Merge Fields have a maximum limit of 255 characters. Anything over 255 characters will be truncated during document processing and may not return the desired results.Installing a Form Letter
Install your Form Letter to your NLS database through the Report Manager.
Go to Setup > System > Report Manager.
Click Add Report.
Fill in the fields of the Add Report Dialog as follows:
Type | Select CIF from the drop down list. |
Category | Select an existing category, or type a name for a new one. If you enter a new category, you will be creating a new branch of your report tree. |
Format Title | Enter the title for the report, as you would like it to appear on the report tree. |
Description | Enter any descriptive information about the report for future reference. |
Path | This defaults to your local directory. It specifies the location where the particular instance of the report will be generated at the time that you run the report. You can set the report to generate somewhere else if you wish. |
Format File | Click to browse your directories to locate the Microsoft Word Mail Merge document that you created in the previous step. |
Click OK to return to the Report Manager screen.
On the Report Manager, click OK to save the report.
You will be prompted to shut down NLS, as the changes that you have made to the report tree are loaded in from the database at the time the program is launched. Click Yes to restart the application.
Running Word Reports
Individual Reports
To run a custom report on a single contact, first go to Loan Query and search for the contact on which you wish to run the report. Click Individual Report . From the menu of available reports, select the mail merge document that you had created and installed. Then, click . The report will be displayed in an embedded Microsoft Word window, and its Mail Merge Fields will be replaced with the appropriate data for those fields, from the selected contact. You may send the report to the printer by clicking . The document may also be saved to the contact’s Comments & Documents area.
Multi-Merge Reports
In order to print your report as a Mail Merge document that will pull data fields from multiple contacts, select the report from the main Report Selection Tree. The available parameters for this type of report include Contact Number, a range of Contact Numbers, Contact Entry Date, or a Range of Contact Entry Dates. If no parameters are selected, the report will print for all contacts.
When you have selected your parameters, click . The first page of the Mail Merge Document (the report for the first selected contact) will be shown on the screen. Click to print all of the pages of the report.
Creating a Word Statement
To create a custom statement for use in NLS, you will create a document in Microsoft Word using the Mail Merge features.
Any computer from which you intend to run this report must have all necessary fonts installed. If you use a font in the document, which is not installed on the computer that runs the report, Microsoft Word will substitute another font, and this may alter the format of your report.
Word statements can use data from the loan fields as well as the contact fields. The statement should consist of a Header (optional), Footer (optional), and a document body. All of the static information for the statement (customer name and address, loan number, total payment amount, remittance address, etc.) should be placed in the header and footer. The body of the document should contain the Merge Fields for any statement detail items.
To create the statement, first launch Microsoft Word. The exact procedure may vary depending on the version of Microsoft Word being used.
Select the menu File > New….
Click Blank Document.
Now, edit your Word document. To insert a Merge Field, press Ctrl-F9 to enter the merge braces {}
. Enter the MERGEFIELD
command followed by the field name of the data you wish to add, for example {MERGEFIELD cifnumber}
. Word has a maximum limit of 63 unique fields per document.
The MERGEFIELD
command cannot be used in the header or footer portions of a document. Use the SET
and MERGEFIELD
commands in the body of the document to define bookmarks for use in the header/footer.
The SET
command is also useful in cases where you will need to access the same piece of data multiple times in the document, and that data is generated by a complex SQL query. Using this command allows you to only do the SQL command twice.
Example
{SET loan_number {MERGEFIELD loan_number}}
This query will define a bookmark loan_number
that points to the {MERGEFIELD loan_number}
command.
Once the bookmark is defined in the body, it can be used in the header or footer by simply entering the bookmark in the merge braces.
example
Once the above bookmark is defined, the command{loan_number}
placed in the header is functionally equivalent to the command {MERGEFIELD loan_number}
in the body of the document.Once the document is complete, save it to an appropriate location.
A sample statement can be downloaded from the Nortridge Software Community in the API, Scripting and Developer Questions category > Office Integration Files topic. Open the statement with Microsoft Word to see how it is structured. If all of the merge commands are not displayed press Alt-F9 to switch between the results view and command view.
Next, you will install the statement in your NLS database.
Installing a Word Statement
Install your statement on to your NLS database through the Report Manager.
Go to Setup > System > Report Manager.
Click Add Report.
Fill in the fields of the Add Report Dialog as follows:
Type | Select Statement from the drop down list. |
Category | Select Loan Statement or Late Notice from the drop down list— for a word statement you cannot type in a new category. |
Format Title | Enter the title for the statement, as you would like it to appear in the Statement Tree. |
Description | Enter any descriptive information about the report for future reference. |
Path | This defaults to your local directory. It specifies the location where the particular instance of the report will be generated at the time that you run the report. You can set the report to generate somewhere else if you wish. |
Format File | Click to browse your directories to locate the document that you created in the previous step. |
Click OK to return to the Report Manager screen.
On the Report Manager, click OK to save the report.
You will be prompted to shut down NLS, as the changes that you have made to the report tree are loaded in from the database at the time the program is launched. Click Yes to restart the application.
The statement will now appear in the Statement File drop down list in the Statement tab of the Loan Setup dialog.
Tip
If you encounter an error—The OpenDataSource2000 method or property is not available because this command is not available for reading—when running the custom report, try the following:- Open Microsoft Word.
- Click File > Options. If you do not see the File menu, create a blank document or open an existing document.
- In the General tab go to Start up options and deselect the Open e-mail attachments and other uneditable files in reading view option.
- Close Microsoft Word and restart NLS.