Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mailmerge into two different formats
Hi,
Can anyone advise whether the following is possible :- I'm using Word 2003 (and Excel 2003) I'm wish to drive mailmerge from an excel "database" which has columns named "type", "title", "description", "owner", "status" I want the mailmerge to work as follows:- If type is "1" then the other 4 fields are arranged in a small 2*2 table with line borders If type is "2" then the title alone is displayed (without any table or borders) Many thanks Rob |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mailmerge into two different formats
You should be able to do this using an IF field, e.g.
a. create your "type 1" table exactly how you want it, and put the merge fields you want in the table b. create an IF field (use ctrl-F9 to insert all the special field code brace pairs): { IF "{ MERGEFIELD type }" = "1" "your table" "{ MERGEFIELD title }" } or the following will probably be OK in this case: { IF { MERGEFIELD type } = 1 "your table" "{ MERGEFIELD title }" } c. Use Edit-Copy and Edit-Paste to copy your table to yhe place where I've put your table d. delete the original table e. test! Of course, that assumes that any type other than 1 should result in the title being displayed. If that's not the case you can nest IF fields or use other approaches depending on exactly what you need. Peter Jamieson http://tips.pjmsn.me.uk robw wrote: Hi, Can anyone advise whether the following is possible :- I'm using Word 2003 (and Excel 2003) I'm wish to drive mailmerge from an excel "database" which has columns named "type", "title", "description", "owner", "status" I want the mailmerge to work as follows:- If type is "1" then the other 4 fields are arranged in a small 2*2 table with line borders If type is "2" then the title alone is displayed (without any table or borders) Many thanks Rob |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mailmerge into two different formats
Thanks Peter, I've tried that but couldn't get it to work.
(Obviously) I can get the straightforward "show A or show B depending on the value of C" scenario to work correctly. I can even get it to work as expected when the font size and colour of A is different from those of B - which I found to be a pleasant surprise. However , if A (or B) is a table, copied into place as you suggest, it doesn't show at all for the relevant value of C. Even if the table is the degenerate 1x1 case it doesn't work Am I simply expecting too much? Regards Rob |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mailmerge into two different formats
Peter's suggestion works for me. With the field codes displayed in the
document, the field construction looks like the following where | represent the vertical borders of the table cells: { IF { MERGEFIELD Type } = 1 " | { MERGEFIELD Title } | { MERGEFIELD Description } | | { MERGEFIELD Owner } | { MERGEFIELD Status } | ΒΆ " { MERGEFIELD Title } } Note that there is a paragraph mark after the table that is included in the quote marks surrounding the table. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "robw" wrote in message ... Thanks Peter, I've tried that but couldn't get it to work. (Obviously) I can get the straightforward "show A or show B depending on the value of C" scenario to work correctly. I can even get it to work as expected when the font size and colour of A is different from those of B - which I found to be a pleasant surprise. However , if A (or B) is a table, copied into place as you suggest, it doesn't show at all for the relevant value of C. Even if the table is the degenerate 1x1 case it doesn't work Am I simply expecting too much? Regards Rob |
#5
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mailmerge into two different formats
Thanks Doug...and thanks again Peter
I've now got it to work !! Regards Rob |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Maintain excel formats in a word mailmerge | Mailmerge | |||
TOC Formats | Microsoft Word Help | |||
formats | New Users | |||
TOC formats | Microsoft Word Help | |||
date formats | Microsoft Word Help |