Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Conditional Merge with Tables.
Hi,
I'm using Word 2000 and I'm trying to work out how to do a merge whereby a table is printed dependant on a condition. The pseudo-code is: If (Mergefield(a) = "BACS") or (Mergefield(a) = "") then ---------------------------------- | Table goes here | |--------------------------------| | multiple rows | |--------------------------------| | | ---------------------------------- Else ' Print nothing at all, not even a blank line. End If The "If..Then..Else" Word merge field doesn't seem to help as I can't paste formatted text into the relevant places in the dialog box. I'm sure I was able to do this in WP5.1 for DOS so I MUST be able to do this in Word 2000. Am I missing something particularly obvious? Can anyone advise? Thanks Andrew Minor |
#2
|
|||
|
|||
The "If..Then..Else" Word merge field doesn't seem to help as I can't
paste formatted text into the relevant places in the dialog box. Don't try to paste formatted text into the dialog box. Make sure you are in the view where you can see the field codes, e.g. { IF { MERGEFIELD a } = "BACS" "" "" } then paste the table cells directly between the relevant quotes. You will not be able to avoid having extra paragraphs around the table, but when the result is "" you should not have any extra lines at all. If you really need IF a = "BACS" or a = "", you can't use an "or" in the IF field in the way you have shown. You can do it using a bit more nesting, e.g. { IF { ={ COMPARE "{ MERGEFIELD a }" = "BACS" }+{ COMPARE "{ MERGEFIELD a }" = "" } } 0 "put your table here" "" } I'm sure I was able to do this in WP5.1 for DOS so I MUST be able to do this in Word 2000. In the general case, that ain't necessarily so, although I believe you should be able to do what you want in this case. Am I missing something particularly obvious? I don't think so. Peter Jamieson "Andrew Minor" wrote in message om... Hi, I'm using Word 2000 and I'm trying to work out how to do a merge whereby a table is printed dependant on a condition. The pseudo-code is: If (Mergefield(a) = "BACS") or (Mergefield(a) = "") then ---------------------------------- | Table goes here | |--------------------------------| | multiple rows | |--------------------------------| | | ---------------------------------- Else ' Print nothing at all, not even a blank line. End If The "If..Then..Else" Word merge field doesn't seem to help as I can't paste formatted text into the relevant places in the dialog box. I'm sure I was able to do this in WP5.1 for DOS so I MUST be able to do this in Word 2000. Am I missing something particularly obvious? Can anyone advise? Thanks Andrew Minor |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Merge two tables | Tables | |||
access-word merge - tables and queries disappear | Mailmerge | |||
complex conditional merge | Mailmerge | |||
How do you merge two Access databases into one set of tables | Microsoft Word Help | |||
Conditional mail merge | Mailmerge |