Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
robw robw is offline
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
robw robw is offline
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
robw robw is offline
external usenet poster
 
Posts: 3
Default 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

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Maintain excel formats in a word mailmerge ciccio Mailmerge 2 October 29th 08 08:50 PM
TOC Formats briank Microsoft Word Help 1 September 14th 08 12:09 AM
formats Dubai Dunes New Users 2 November 26th 06 06:08 PM
TOC formats Epinn Microsoft Word Help 5 September 17th 06 05:31 PM
date formats kevin Microsoft Word Help 2 February 19th 06 05:40 PM


All times are GMT +1. The time now is 09:25 AM.

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"