View Single Post
  #14   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default Mail merge .. . If Then Else

Hi CM,

OK, so how did you create the braces (ie '{ }') used in your field coding -
{ IF { MERGEFIELD PatientCode } = "XX" "@" "" }
The syntax you've posted is correct. But, if any of the braces were typed, the field won't work. You need to create them (in pairs)
via Ctrl-F9.

Cheers

| Hi - thanks for all your responses but i still have the same issue.
| The value in the merge field is XX - as part of the testing i did i
| printed the merge field to screen and also concantenated a value
| either side to confirm that only the XX was contained within - i used
| the following;
|
| "Start" MERGEFIELD PatientCode "End"
|
| The output was;
|
| StartXXEnd
|
| So i know that there are no trailing white spaces.
|
| This issue is really quite annoying - using the code provided in the
| responses above it should in theory execute the IF statement for the
| XX condition.
|
| Any further suggestions greatly appreciated. Failing that i will try
| and look for another merge field to use to generate the condition and
| meet the business requirements needed in the front end.
|
| Thanks in advance,
|
| CM
|