View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
 
Posts: n/a
Default Can one different files in an "If then... else" WORD merge?

In theory you ought to be able to do

{ IF "{ MERGEFIELD Language }" = "E" "{ INCLUDETEXT
"c:\\mydocs\\myfilleE.doc" ""
}{ IF "{ MERGEFIELD Language }" = "F" "{ INCLUDETEXT
"c:\\mydocs\\myfilleF.doc" ""
}

but in practice you may have to use something more like

{ INCLUDETEXT "c:\\mydocs\\myfile{ MERGEFIELD Language }.doc" }

and deal with the situation where Language is not "E" or "F", e.g. have
another file called myfile.doc and use

{ INCLUDETEXT "c:\\mydocs\\myfile{ IF "{ MERGEFIELD Language \*Upper }" =
"E" "E" "{ IF "{ MERGEFIELD Language \*Upper }" = "F" "F" "" } } }

etc.

Peter Jamieson
"Eric_G" wrote in message
...
I am attempting to perform a merge where one field indicates "Language".
Where the language field is "E", I want to use one WORD .doc file and
where
the language is "F", I want to invoke a different WORD .doc file. Can I
do
this within a WORD merge using the 'IF... THEN ELSE" merge codes or if
not,
is there a better way?