View Single Post
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Swapping between 2 tables using if then else

In a simple example, if I start with an IF field that looks something
like this (after pressing Alt-F9 to show "field codes":

{ IF { MERGEFIELD x } = 0 "table1" "table2" }

where table1 and table2 are actual word tables that I have
copied/pasted into the IF field, it seems to work OK.

Maybe you are doing something else?

If you want, despam my email pjj att pjjnet ddott demon ddott co ddott
uk , send me your mail merge main document and some test data and I'll
see what I can do.

In any case, please let us know
a. which version of Windows
b. which version of Word
c. what the data source is.

Peter Jamieson

http://tips.pjmsn.me.uk

On 14/12/2009 19:13, Miranda Gray wrote:
I am trying to figure out if I am sleepy and missing an obvious step or if Word doesn't like what I am doing.

I have a bilingual document. Based on a single number language flag, I want to display an English table or a French table. [The merged data in the table is the similar but the headers vary.]

I can't get it to accept a table in the if or the else fields. I can only get the first table I paste to display.

Even when I move to a less complex table with fewer rows and merge fields, the same bad things happen.

Is this a known issue or something with a klunky workaround?

I really don't want to have to interlace the English and the French responses by hand into a single merged document.


Submitted via EggHeadCafe - Software Developer Portal of Choice
Custom Self-Expanding Multiselect Winforms ListBox
http://www.eggheadcafe.com/tutorials...nding-mul.aspx