Reply
 
Thread Tools Display Modes
  #1   Report Post  
Alex James
 
Posts: n/a
Default Insert a MM field if there is a paticular value in another field

I have two seperate address blocks (as seperate fields) in my data source. I
want to use either 'address block A' or 'address block B' in the mail merge
based on a preference indicated in the data source. So 'IF field pref =
"A" merge 'address block A' else merge 'address block B'' is basically what I
want to do. I can use IF statements for merging text from different
documents based on this type of criteria but not different merge fields. Any
help greatly appreciated.
  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

You can use another mergefield in the results for an If...then...Else field.
Rather than use address blocks however, you will probably need to use an
If...then...Else field for each mergefield that makes up the address block.

{ IF { MERGFIELD pref } = "A" { MERGEFIELD Aaddress1 } { MERGEFIELD
Baddress1 } }
{ IF { MERGFIELD pref } = "A" { MERGEFIELD Aaddress2} { MERGEFIELD
Baddress2 } }
{ IF { MERGFIELD pref } = "A" { MERGEFIELD Acity } { MERGEFIELD Bcity } }

etc.
--
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
"Alex James" wrote in message
...
I have two seperate address blocks (as seperate fields) in my data source.
I
want to use either 'address block A' or 'address block B' in the mail
merge
based on a preference indicated in the data source. So 'IF field pref
=
"A" merge 'address block A' else merge 'address block B'' is basically
what I
want to do. I can use IF statements for merging text from different
documents based on this type of criteria but not different merge fields.
Any
help greatly appreciated.



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
Mail Merge Field window should remain open to insert multiple fiel Steinway60 Mailmerge 1 July 20th 05 04:08 PM
Insert a file into a merge field kim Mailmerge 1 July 18th 05 05:13 PM
Mail merge field different in datasource & insert a field menu Silvs Mailmerge 1 April 22nd 05 06:18 AM
How do I insert a field in a dialog box? Sam I Am Microsoft Word Help 1 January 6th 05 09:56 PM
How do I insert a field into a MS Word so I can use the first and GLW Mailmerge 1 January 4th 05 05:05 AM


All times are GMT +1. The time now is 05:55 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"