Mail Merge

 

When Mail mergeoption checkbox is checked, the driver recognizes special character sequences in the printed text to extract text information in a text file and the merge.mrg file.

 

The recognized character sequences all start with the ## characters. Most of these commands make the driver remove or alter the printed text and write it in the merged output file in text format. This file has the same filename as the group file, with the .mrg extension. The actual name of this file is written in the group file in the following format:

Merge Output=c:\aaaa1000.mrg

 

In addition, an output text file is generated containing the extracted text from the printed document including the mail merge characters.

 

The recognized command sequences are as follows:

 

Command sequence

Description

##~~

Lines starting with these four characters and ending with ~~ are not printed on the output image file, but written into the merged output file *.mrg

For example, if the following string is sent to the driver:  

 

##~~ Phone number=6031234321~~Hello Hello Hello

 

there is an empty space printed in place of Mail Merge string then followed by " Hello Hello Hello" in the output image file and the following line is added to the merged output file *.mrg:

Phone number=6031234321.

 

##**

Lines starting with these four characters and ending with ** are partially printed and also written to the merged output file. If the string enclosed by the ** marks contains an equation mark, the characters after the equation mark are printed. Otherwise, the whole string between the asterisks is printed.

 

Every character between the asterisks is written to the merged output file.

For example, if the following string is printed with the driver:

 

##** Addressee=Company Name**

 

the following is written to the merged output file:

 

Addressee=Company Name

 

and the following line is printed into the output image file:

 

Company Name

 

 

All the above command lines must be printed as one continuous string from left to right. If they are printed one part at a time using several separate printing function calls (first printing ##~~and then the rest of the line), the driver may not be able to correctly recognize them.

 

The application prints in segments if one changes font type or font size in the text. The mail merge string must be of one font type, the same font size and color.

The mail merge file *.mrg also contains page delimiter information to mark where the new page started. The page delimiter is an empty line, the ‘Page 1:’ text (where the number is the current page number), and another empty line in the *.mrg file, for example:

 

Page 1:

Page 2:

Page 3:

 

This information appears in the mail merge file even if there is no mail merge information on that particular page.

 

To activate the Mail merge feature of the printer driver, one must first enable the Text Output feature of the printer driver, and then click on Mail merge.

 

For reference, see the following screen capture: