summaryrefslogtreecommitdiff
path: root/macros/text1/pc/models/mergetxt.mdl
blob: 9b5c9ac53499fd1ad7bf6192669e4a4533598075 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
% MERGE LETTER MODEL, merges address list with letter
\input mergetxt.inp % READ TEXT1 merge file format instructions
%
%         Select special fonts and setting markup used
%         in the merge process here:
%
\selectfontset{cm18}{titlefont}{default} % special letter heading font
\titlepageformat{\titleleadskip{0in}}    % no initial skip for letters
%
%         Run TEXT1 against a file on your disk that includes
%         this model. A set of five sample letters will be printed. The
%         sample letter describes the mail merge setup. Once you have
%         run the model and read the letter,  make the necessary
%         modifications to your file.  Set the address field names of
%         your address file in  the "\fieldnames{name, name, ...}"
%         markup with the data field names of your data base file.
%         Create the "shell letter," your letter, which includes the
%         address field names of your data file, preceded by a "\",
%         i.e.,  \namea, \nameb, etc.  You need use only those data
%         fields necessary in the document and address label, but all
%         fields in your data base file must be given in the field
%         names markup.  Specify the name of your letter file
%         "shell letter" with the "\documentfilename{fn.ft}" markup;
%         specify the address data file with the "\addressfile{...}"
%         markup; and then PRINT the file containing your letter merge
%         model to merge the address file with the shell letter and
%         print the label sheet.
%
% NOTE:   If you create an address file by hand remove the percent sign
%         before the datacheck MARKUP.  The number of the letter from the
%         beginning of the merge file data base and the first and last
%         data fields will be listed on the screen and in the log file
%         when data check is active.  This will aid you in finding any
%         errors in your data file.
%
%\datacheck % SET DATACHECK by removing the "%" symbol
%
%         Give all data field names in sequence of occurrence
%         (address list names)
%
% Format: \fieldnames{name1, name2, name3, ..., namelast}
 
\fieldnames{title, firstname, lastname, company, address, city,
            state, zipcode, phone, amount}
 
%         Give file name for document text (letter file that includes
%         the field names for the replaceable text in the document)
%
% Format: \documentfilename{filename.filetype}
 
\documentfilename{mergelet.mdl}
 
% WARNING!
%        If you want to modify the address label format, then the
%        \addresslabelformat markup MUST come prior to the
%        \datafilename  markup.
%
% Format: \addresslabelformat{all fields and markup to create label}
 
\addresslabelformat{\noindent\title\ \firstname\ \lastname\lbr
                    \company\lbr
                    \address\lbr
                    \city, \state\quad\zipcode}
 
%         Now specify where the address data file is located with
%         the \datafilename markup.
%
% Format: \datafilename{filename.filetype}
 
\datafilename{mergelst.mdl}
 
% PRINTING A MAILING LABEL SHEET
%
%         You may use the "\maillabelformat{}" markup to change
%         the default label format markup.  The default label format
%         prints three inch-high labels across the page which can be
%         copied onto a label sheet with an appropriate copy machine.
%
% WARNING!
%        The \maillabelformat{} markup must be placed BEFORE the
%        \printlabels markup to change the system defaults.
%
%        Select the font setto be used in printing the labels.
 
\tenpt   % prints labels with computer modern ten point
 
\printlabels % print address label sheet for Xerox label sheet
 
%        Labels will be printed beginning on page 99.
%
% WARNING!
%        If you have an empty data field occurs in the data being
%        processed within the \addresslabelformat, the field will
%        be printed as a blank space or as a blank line if the
%        field is by itself on the line.