View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default INCLUDETEXT putting both docs into merge

To start with, instead of the two If...then...Else constructions, you can
use

{IF {"ASK LoanOrLOC" } = "loan" {INCLUDETEXT "N:\\Precedents\\Loan Approval
Merge.doc" } {INCLUDETEXT "N:\\Precedents\\Solicitor's Certificate
Merge.doc"} }

But I suspect that the reason that you might be getting both documents is
that the response to the IF is neither "loan" nor "LOC" and with the double
quotes that you had before the "" {INCLUDETEXT part of each If...then...Else
field construction, you were getting the Not True result in both cases.

If using the modified If...then...Else always gives the same result,
regardless of whether "loan" or "LOC" is supplied, that would confirm my
suspicion and I would suggest that if you can, you add a field to the
datasource in which you specify which type of transaction it is and then
test for the value of that mergefield.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"MDales" wrote in message
...
What have I doing wrong here? I want the merge to insert one document if
you
answer "loan" and a different document if you answer "LOC" . I get an
error
message "A field calcualtion error occurred in Record 1" and it inserts
BOTH
documents.

Here's what I've done codes:

{ASK LoanOrLOC "Is this a Loan or a Line of Credit? (loan or LOC)" \o}{IF
{"ASK LoanOrLOC" } = "loan" ""{INCLUDETEXT "N:\\Precedents\\Loan Approval
Merge.doc" } ""} {IF {"ASK LoanOrLOC"} = "LOC" "" {INCLUDETEXT
"N:\\Precedents\\Solicitor's Certificate Merge.doc"} ""}

I'm fairly new at this and it sure is more difficult than with
WordPerfect,
which simply let you string macros together. Would sure like to know
what
I'm doing wrong.
Martha