Multiple merge with IncludeText generating extraneous hidden chara

J

Judy

I have a merge letter using multiple IF and IncludeText statements to vary
the text of the letter. This works correctly for all of the various IF
statements when I merge the letter.

However, I also have a "master" document that I am using for 2 reasons:
1) to merge multiple forms (letter, envelope, information forms, etc)
including the above letter in one pass (they all use the same data source),
and
2) so that I can vary the font size of the letter based on criteria in
the datasource. This is accomplished with the following:
{IF {MERGEFIELD Require_Large_print } = "True" "{INCLUDETEXT
"AckLetterRecpt" \*CharFORMAT}" "{INCLUDETEXT "AckLetterRecpt" \*
CHARFORMAT}"} (the first/true part of the evaluation is formatted to a
larger font size)

When I merge the master document to a file, everything looks fine. However,
when I *print* the document on paper, a number prints as part of the text
where the result of an IF statement appears. The number is either 1 or 2,
which appears to depend on the evaluation of the Large print field that is
made in the master document. The number is not visible or selectable on
screen in the merged document, and does *not* print if I merge directly from
the merge letter -- only if I merge from the master document. The IF
statement where this appears is:
{IF MERGEFIELD VIP = "True" "

" "signature"}
(the actual letter has the location of a file containing a graphic with the
signature instead of the word signature, but I changed it to text for testing
purposes).

The 1 or 2 overprints the letter "s" in the word signature.

I am completely stumped as to where this number is coming from, why it is
printing in this case (and not from any other IF statements) and how to get
rid of it.

Any help or suggestions for what to look at would be greatly appreciated.
 
P

Peter Jamieson

I don't know what is wrong, but when you say "master" document, do you
actually mean a Word Master Document, or do you mean something more like an
ordinary document with multiple INCLUDETEXTs?

In this kind of situation, I would normally aim to try different ways of
doing the same thing - in this case, could you for example have two versions
of your AckLetterRecpt letter and use something like

{ IF { MERGEFIELD Require_Large_print } = "True" "{ INCLUDETEXT
"AckLetterRecptLarge" }" "{INCLUDETEXT "AckLetterRecptSmall" }" }

or perhaps even have AckLetterRecptTrue and AckLetterRecptFalse and use

{ INCLUDETEXT "AckLetterRecpt{ MERGEFIELD Require_Large_print }" }

Peter Jamieson
 
J

Judy

Thanks for the suggestion. I was referring to an ordinary document with
multiple includetexts, not a Word master doc. I was trying to avoid the need
for two complete versions of the same document, because the document itself
has so many pieces of variable text and included documents. Any changes would
mean finding and updating in multiple locations. The real goal is simply to
vary the font size based on the value of a field. It seems like there ought
to be some way to do that without mantaining two sets of documents. Any other
thoughts?
 
P

Peter Jamieson

First, to go back to your "1" or "2" problem, you gave the syntax as

{ IF MERGEFIELD VIP = "True" "
" "signature"}

But can we assume you are actually using

{ IF { MERGEFIELD VIP } = "True" "
" "signature"}

(If it is actually the former, I think you would normally see "VIP" as the
result, but that may not be the only possibility).

Second,
vary the font size based on the value of a field. It seems like there
ought
to be some way to do that without mantaining two sets of documents.

Unfortunately, not a simple option. It would be easier if you could do
something like

{ INCLUDETEXT "xyz" \s 10 }

where \s set a font size, as in the SYMBOL field, but there is no such
switch for other field types, or if there was a field that let you set up
the characteristics of a paragraph or character style, but there is not such
field type.

Nor can you do

{ IF { MERGEFIELD Require_Large_print } = "True"
"{ SET fontsize 20 }"
"{ SET fontsize 10 }" }

then e.g.
{ { SYMBOL 73 \f "Times New Roman" \s { REF fontsize } }NCLUDEFILE "xyz"
\*Charformat }

because the first keyword in a field has to be plain text - it cannot be
constructed from other fields.

So I think that leaves you with
a. the method you already have, and trying to make that work
b. using VBA and the mailmerge events to go through the document (s) fixing
the font sizes for each record in the data source. In some scenarios that
might work quite well, but if you are close to succeeding with (a) it is
probably worth persevering.

Other than that, no other suggestions.
Peter Jamieson
 
J

Judy

I am actually using the latter syntax ( { IF { MERGEFIELD VIP } = "True" "
" "signature"} ) which I typed incorrectly in my original post. So I'm still
very puzzled as to where my "1"s and "2"s are coming from. Thank you for all
your input. I didn't think there was a simple font size option since I
couldn't find one, but I was hoping I had overlooked something because it
seems intuitive (to me, at least) that there *should* be such an option. Very
frustrating, but I'll keep plugging away. I appreciate the responses.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top