CHAPTER EIGHT Mail Merge What is Mail Merge? The Mail Merge feature of BitFax allows you to send customized form letters to multiple destinations. Without using this feature, sending a letter or message to several people would mean everyone would get the exact same message. Many times, you will want to personalize the message with the person's name, company, or other information. The Mail Merge feature in BitFax allows you to do just that. For example, instead of having Dear Sir at the beginning of a message, the message can be personalized by saying Dear Mr. Brown, where Mr. Brown is taken from the Fax phone book. What Do You Need to Use Mail Merge? You will need a text (ASCII) file containing the message that you want to merge. It will also contain field names from your database. You will also need the database file FAXBOOK.DBF. It must have the structure that is defined below. The contents of selected fields will replace the field name in your text message when they are merged together. Instructions for preparing both of these items are given in this chapter. An Example of Mail Merge The example below shows how you can take the two separate parts (the database and the ASCII file) and merge them into the one combined part (the merged file). In this example, you can create the following text file using a text editor (such as EDLIN) or a word processor. If you use a word processor, make sure that it can save ASCII (text) files. After you have created the file, save it. %%FAX_DESCP%% Attn: %%FAXNAME%% We are planning to have our monthly sales meeting next Friday at 10:00 a.m. If you cannot attend, please notify me immediately. Sincerely, Mr. Brown Sales Manager Continuing with our example, the FAXBOOK.DBF file would look like this. FAXNAME FAX_DESCP FAXTEL FAX_GROUP Mr. Jones Sales Dept. 555-1234 1 Mr. Smith Sales Dept. 555-5678 Mr. Baker Accounting Dept. 555-2468 1 Mr. James Accounting Dept. 555-1357 In this example, say that you want to send your message about the sales meeting to those people in the sales department. Select the filename that you created earlier the same way that you would normally select a file. Since you have two records for people in the sales department, you would select those two records. After you merge the database with the ASCII file, the messages that are sent will look like this. Sales Dept. Attn: Mr. Jones We are planning to have our monthly sales meeting next Friday at 10:00 a.m. If you cannot attend, please notify me immediately. Sincerely, Mr. Brown Sales Manager ------------------------------------------------------------ Sales Dept. Attn: Mr. Smith We are planning to have our monthly sales meeting next Friday at 10:00 a.m. If you cannot attend, please notify me immediately. Sincerely, Mr. Brown Sales Manager The ASCII File (The Message) The ASCII file that you want to send will contain the Field Names from your database file. When it is merged with the database, the contents of these fields will replace the field names in the text. The field names should have two percent signs (%%) before and after them. You should not have any spaces within the percent signs. The text file must be created with a text editor or word processor. You cannot use BitFax to create this file. If you are using a word processor, you may need to convert it to a text file before it is merged. For information about converting word processing files to ASCII, see Appendix D. As an example, if the first line of the text file should be the company name, and your database contains a field name of COMPANY, then the first line of your text file should be: %%COMPANY%% When you merged this with your database, it would be replaced by the actual contents of the COMPANY field from your database. The field names do not have to be on a line by themselves. For example, if you have a field name of LAST_NAME containing last names of customers, you might have a line of text that reads: Dear Mr. %%LAST_NAME%%, The last names from your database would replace the field name of LAST_NAME. You can have more than one field name in your message. As an example, part of your text file might read: %%COMPANY%% Attn: %%FAXNAME%% We show your Fax phone number as %%FAXTEL%%. Please advise if this is correct. The first line of the file would be replaced with the contents of the field COMPANY. The second line would show that it was being sent to the attention of the contents of the FAXNAME field. The Fax Phone Number would be inserted in the body of the letter, replacing %%FAXTEL%%. Field names in dBASE, and therefore also in BitFax, are case sensitive. In other words, the field name of FAXNAME is different than the field name of Faxname. You must match the field names exactly in order for BitFax to merge the database correctly with the message. The Database File The ASCII file that you create to contain your message is merged with the database file FAXBOOK.DBF. If your database file was created by BitFax, the file FAXBOOK.DBF will be structured as shown below. Field Name Field Type Length FAXNAME Character/Text 20 FAX_DESCP Character/Text 50 FAXTEL Character/Text 35 FAX_GROUP Character/Text 5 BitFax will always merge the message file with the database file named FAXBOOK.DBF. This file must contain the field names as shown above. They must also have the same structure and length as shown above. In addition, all the field names must be in the same order as is shown above. You can, however, add more fields to this database using dBASE or a utility that will create dBASE-type files. Make sure that you follow all dBASE field name conventions. You cannot use spaces in any field name. The only punctuation allowed is the underscore ( _ ). Field names can contain letter and numbers, but must always start with a letter. Merging the Data With the Message To merge the data file with the message text, you begin by preparing your text (ASCII) file, as well as your database. Then you would go to the File Selection Menu. To get there from the Main Menu, press [F3]. The complete steps in order are shown below. 1. Prepare your database, noting your field names that will be used in your text message. 2. Using a text editor or word processor, prepare your text message, using the field names from your database as explained earlier in this chapter. 3. Start BitFax, and press [F3] from the Main Menu to go to the File Selection Menu. 4. Highlight the filename of the text message that will be sent by pressing the up or down arrow keys. 5. When the correct filename has been highlighted, press [F9]. A diamond shaped marker will appear next to the filename on the file list. Do not press [Enter] to select a file as you normally would. 6. Return to the Main Menu by pressing [F10]. 7. Press [F4] to go to the Destination Selection Menu. 8. Select a record or records from the database. Or, you may choose to select a Group Number instead of individual records. For additional information about selecting records or Group Lists, refer to Chapter Six. 9. Press [F10] to return to the Main Menu. 10. Send the Fax by pressing [F2]. The text file will be merged with, and sent to, each record that you have selected. If you have selected a Group Number instead of an individual record, the message will be merged with, and sent to, each record within the Group. Each Fax message that is sent will be personalized with the individual information from the phone number records that you selected. To unselect a file for merging, highlight the filename again while at the File Selection Menu, and press [F9]. When you do this, the diamond shaped marker that was next to the filename will disappear. CHAPTER NINE Time Scheduled Transmissions What is Scheduling? The Scheduling feature in BitFax allows you to schedule your Fax transmissions to take place at a later time instead of immediately as discussed before. This gives you more convenience because you don't have to tie up your phone line and computer time during busy hours. You may want to schedule your transmissions to take place at night when the phone rates are lower. When your computer reaches the selected date and time, the Fax transmission will take place. You can even have different files sent to different destinations, at different times, increasing the flexibility of this feature. All the capabilities discussed in the previous chapters are available with time scheduled transmissions, such as mail merge and sending multiple files to multiple destinations. This feature can also be used for batch processing of your Fax transmissions. Normally, you would select files to be sent and a group of people to send them to. You would have to wait until the transmission is complete before sending another group of files to another group of people. With scheduling, a batch of transmissions can be set up ahead of time. This way, you don't have to wait for each batch to be sent. You can select any date or time for the transmission to take place, as long as it is at least 3 minutes past the current time. Make sure that your system is turned on at the time the transmission is scheduled to take place. You do not have to have BitFax running at the scheduled time. You can be running a spreadsheet program, any other program, or you can leave the computer at the DOS prompt. You can select a single filename or multiple filenames to send, or you can use the Mail Merge feature to send customized messages. For the destination, you can select a single record, multiple records, or even a Group List. Or, you may want to schedule any combination of the above options. Before You Begin Scheduling You must have the program BITSCHED resident in your computer. The best way to do this is to put the program in your AUTOEXEC.BAT file. If you already have a file in your root directory called AUTOEXEC.BAT, you can modify it so that the following line is inserted. BITSCHED To do this, you must use a text editor (such as EDLIN) or a word processor that will save ASCII files. You then need to reboot your system for the AUTOEXEC.BAT file to run. Or, you may want to run the program only when you need it. To do so, type the following line at the DOS prompt before running BitFax. BITSCHED [Enter] You will be returned to the DOS prompt, and the scheduling program will stay resident in the computer's memory. Make sure that the DOS clock in your computer is set correctly for the date and time. BitFax schedules it's transmissions according to the DOS clock. To check the date, type the following command from the DOS prompt: DATE [Enter] DOS will respond with the date that your computer thinks it is, and will ask you for the correct date. If the date is correct, simply press [Enter]. If the date is incorrect, type in the correct date, and then press [Enter]. The date format you must use is mm-dd-yy, where mm is the month, dd is the day, and yy is the year. To check the time, type in the following command at the DOS prompt: TIME [Enter] DOS will respond with the time that it thinks that it is, and will ask you for the correct time, just like the DATE command shown above. The time will be shown in a 24-hour format of hh:mm, where hh is the hour, and mm is the minutes. As with the date command, simply press [Enter] if the time shown is correct. If the time is incorrect, type in the correct time in the format shown above, and then press [Enter]. Selecting a File and Destination To set up a scheduled transmission, you need to select a file and destination. Follow the steps below to select these items. 1. Start BitFax. 2. From the Main Menu, press [F3] to go to the File Selection Menu. 3. Using the up or down arrow keys, highlight the filename of the file that you want to send. 4. Press [Enter] to select the file, or [F9] if you are using the Mail Merge feature. 5. Press [F10] to return to the Main Menu. 6. Press [F4] to go to the Destination Selection Menu. 7. Highlight the record that you want to send a Fax to by pressing the up or down arrow keys. 8. Press [Enter] to select the record. Or, you may want to select a distribution list instead of a record. 9. Press [F10] to return to the Main Menu. The Scheduling To set up time scheduled transmissions, follow the steps below. 1. Make sure that you have BITSCHED running as discussed earlier in this chapter. Also make sure that your time and date are set correctly in your computer. 2. Follow the steps as discussed previously for selecting the destination and filenames to be sent. 3. After you have returned to the Main Menu, press [F5] to schedule. (Previously, you would have pressed [F2] to send). 4. Fill in the date and time that you want the selected files to be sent. 5. Press [F10] to return to the Main Menu. 6. If you want to send another file to another phone number, repeat steps 3 to 5. 7. You can now press [F10] again to exit BitFax. At this point, you can begin using another program. Just remember to leave your computer turned on so that the scheduled Fax can be sent. Viewing the Schedule You can also look at the scheduled entries, and view their individual status. Each entry that you schedule will appear on the Schedule Log, with a status message next to it. This is different from the Status Log. However, any scheduled entries that have already taken place will also be shown on the Status Log. To view the schedule, press [F5] from the Main Menu. Then, from the scheduling window, press [F2] to View. There will be five items shown for each scheduled entry: Date, Time, File Name, Destination, and Status. The Date and Time are when you have scheduled the transmission to take place. The File Name and Destination are those that you have selected. The status is what has happened or is going to happen for that entry. You will be shown one of four status messages. These are explained below. On Schedule This status message indicates that the transmission is scheduled to take place, and the time and date you have selected are still in the future. No action is necessary. Deleted This message indicates that you have marked a scheduled entry to be deleted. It will not be sent unless you undelete it. Sent - OK This message indicates that the scheduled entry was sent, and the transmission was completed without any errors. Sent - Err This status message indicates that the scheduled entry was completed, but with errors. Check the BitFax Status Log to determine whether or not the Fax should be sent again. Modifying the Schedule BitFax also allows you to delete any entries that are scheduled to take place. It also allows you to clear entries that have already been sent. Deleting an entry on the Schedule Log is similar to deleting a record from the Phone Number database. You will mark an entry to be deleted, and an asterisk ( * ) will appear next to it. Those entries will an asterisk next to them will not be sent. If you want to change information for a scheduled entry, you must delete that entry, then schedule the entry correctly. To delete an entry from the schedule log, follow the steps below. 1. From the BitFax Main Menu, press [F5] to go to the Schedule Window. 2. Press [F2] to view the Schedule Log. 3. Highlight the entry you want to delete by pressing the up or down arrow key. 4. Press [F7] to delete the entry. An asterisk will appear to the left of the entry. The status message for this entry will change to "Deleted." You may also want to undelete an entry that you have marked to be deleted. Follow the steps below to do so. 1. From the Schedule Log, highlight the deleted entry you want to undelete by pressing the up or down arrow keys. 2. When the entry is highlighted, press [F7] to undelete the entry. The asterisk next to the entry will disappear. If the scheduled time is still in the future, the transmission will take place as usual. Instead of simply marking an entry to be deleted, you may want to clear the entry completely from the Schedule Log. For example, if you have entries that were sent without error, you may not need to keep this information in the Schedule Log after some time has passed. To clear an entry completely from the Schedule Log, follow the steps below. 1. From the Schedule Log, highlight the entry you want to from the schedule by pressing the up or down arrow keys. 2. When the entry is highlighted, press [F8] to clear the entry from the schedule. 3. Repeat the above steps to clear other entries from the schedule, or press [F10] to return to the Main Menu.