Reply
 
Thread Tools Display Modes
  #1   Report Post  
Andrew Minor
 
Posts: n/a
Default 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   Report Post  
Peter Jamieson
 
Posts: n/a
Default

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merge two tables Ed Crane Tables 1 May 18th 05 07:30 PM
access-word merge - tables and queries disappear uc user Mailmerge 2 April 22nd 05 01:45 PM
complex conditional merge Walter Mailmerge 0 January 9th 05 01:49 AM
How do you merge two Access databases into one set of tables Charles, UVA Health System Microsoft Word Help 0 December 2nd 04 10:25 PM
Conditional mail merge Hanif Mailmerge 1 November 26th 04 08:10 PM


All times are GMT +1. The time now is 04:40 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"