I'm trying to create a sequential list using field codes and mail merge. My problem is that certain items do not need to appear on the list, depending on how the mail merge goes. This is confusing, so I will give an example.
Let's say I'm putting together a list of quantities for various fruits. I've got a mail merge document that tells me how many apples, oranges, and pears I have. So the list might look like:
1. There are 32 apples.
2. There are 27 oranges.
3. There are 3 pears.
Using field codes it looks more like:
(SEQ list1) There are (MERGEFIELD "Apples") apples.
(SEQ list1) There are (MERGEFIELD "Oranges") oranges.
(SEQ list 1) There are (MERGEFIELD "Pears") pears.
Now, if there are no oranges, I don't want it to be on the list at all. I just want the list to look this this:
1. There are 32 apples.
2. There are 3 pears.
To do this, I use if/then conditioning. (IF (MERGEFIELD Oranges) = 0 "" "(SEQ list1) There are (MERGEFIELD "Apples") apples. This is successful in removing the oranges from the list, but there remains a space:
1. There are 32 apples.
2. There are 3 pears.
I've tried every which way I can thing to get rid of that space, but I can't figure it out. Perhaps someone here could help me.