Custom mail merge letters


There can be multiple letters done using this option. Such as a patient and physician follow-up letter. You will just need to create both mail merge documents with separate names. Letter names could be phyfrm or patfrm.

 



The first step is to create a mail merge document. You can do this in Microsoft Word or Corel Word Perfect. The file name for Microsoft Word must be a *.doc file. The file name for Corel Word Perfect must be a *.frm file. These file that are the mail merge forms will need to be saved in the ..\mfiles directory for the process to work. You must be familiar with this option of creating form letters. If not go through the help of Microsoft or Corel to learn how to create these files. You can create the form any way you want the follow-up letter to look. There will be certain data items that you want to import from the data base. The field names will need to follow a specific naming process. For the first field to be imported into the letter it will need to be named field1. The second field will need to be named field2 and so forth. Once the letter has been created you will need to create the imported data file. This is the part that RMCDS software will create the data file to import.



This option is available under reports. The sub menu is Letter\Worksheets. The report is called Custom mail merge letter. You create the file that contains the data using this option. In the form you named the fields field1, field2, field3 and so forth. The data items selected has to correspond directly with the data item you want to go into field1. So the first item added in the one that goes to field1 on the form. Once you have added all the items the number of merge fields must be equal to the number of fields on the form. You can now select the File menu and select Save file format. You can reuse this each time you create your data file by choosing from the File menu Load file format. You will also need to type in the name of the form that was created. Such as phy for the physician letter. You will not need the file extension such as .doc. This is needed so after the file is created it can go right into Microsoft Word or Corel Word Perfect and display the form that you created. The file that the data is stored in is in the pfiles directory and is called mergfu.p.



You will need to follow different instruction depending on if Microsoft Word or Corel Word Perfect is used.



Microsoft Word



If this is the first time running this option you will need to set the data file up for the form. There will be a button that will be called Find Data Source. The data file is in the pfiles directory and called mergfu.p. To see this file you will need to choose view file type with the option all files. Double click on the file called mergfu. This will bind the data file to the form letter.



The form letter should now be visible in the text editor. The option that needs to be run is under the Tools menu. This is called Mail merge. This will open a window with merge properties in it. The main document is what you saved as the form file. An example of this is..\pfiles\phyfrm.doc. The Data Source is ..\pfiles\mergfu.p. If these two options are set up push the merge button. This will open up a new window.

One more option will need to be set up. The option is "When merging records". This needs to be the option print blank lines when data fields are empty. Once this is selected push the merge button. This will merge the data with the form and create a new document that is the completed form. You can print this form or save it to a file and print later.



Corel Word Perfect



The text editor will open and display the letter form. The first thing that needs to be done in Word Perfect is the file ..\pfiles\mergfu.p will need to be converted to a format that it recognizes.

From the menu choose File open. The file will be in the pfiles directory of RMCDS. Double click on the file mergfu.p. This will go into a convert file format window. Click on the arrow and choose ANSI(Windows) delimited format. Click the ok button.

This will open a window that shows the conversion properties. Choose import as: Merge data file. Add a .p to the file name so it is mergfu.p. Field: needs to be changed from a , to a | symbol. Encapsulated should be blanked out so it does not show the " mark. Click the box first record contains field names. You can now push the ok button. This will convert the data file to a usable form that Word Perfect understands.

Now you need to save the file as mergfu.dat. Do this by clicking on the File menu and save as option. The file will need to be named mergdata.dat. Push the save button. The file that you saved can now be closed by pushing File close option.



The merge button can be pushed. This will open up a new window.

The data source must be mergfu.dat. Push the option button to set a parameter. The parameter that needs to be changed is If field is empty in data source.

Change this to leave blank line and click ok. This will close this window and you can now push the merge button. This will create the new file to print or save.