Reply
 
Thread Tools Display Modes
  #1   Report Post  
jdawgnat
 
Posts: n/a
Default Mail Merging Certain Rows from Text Source

Good morning,

I have a letter in Word XP that I am using mail merge in order to
import from a ; delimitted text file. It imports the data fine but I
have a question. The letter should only go out to people who have GR as
the value in the GR field. I used the IF statement to conditionalize
fields, however if the person does not have GR as the value it simply
makes a letter with all the merge fields blank. Is there a way to make
it only do letters for those with GR as the value?

And example of my current formula is:

{IF {MERGEFIELD GR} = "GR" "{MERGEFIELD "First_Name"}" ""}

I thought about removing the last set of quotation marks but I don't
know if that will break the logic. Any advice would be great. Thanks

Jonathan

  #2   Report Post  
Peter Jamieson
 
Posts: n/a
Default

Assuming you are only producing one letter for each record in the data
source, or that it is always safe to ignore all records where the value in
GR is GR, try this:
a. make a backup copy of your document, just in case
b. remove the IF field
c. Use Tools|Customize to enable the Mail merge toolbar. Click the Mail
Merge Recipients button (typically the third from the left)
d. click the little arrow in the column heading of the "GR" column, and, if
Word lets you select the value "GR", do that, and the list of records should
be filtered. If you don't see a GR value, click the Advanced... option, and
specify the condition where the GR field equals GR. You should not need to
put any quotes around the GR.
e. Come out of the dialog box and save and close your document. Then try
opening it again to verify that Word has remembered its data source, and the
filter condition. If it has, you're probably OK and you should get what you
need. if not (and that may be the case in Word XP unfortunately), further
thought is needed...

Peter Jamieson

"jdawgnat" wrote in message
oups.com...
Good morning,

I have a letter in Word XP that I am using mail merge in order to
import from a ; delimitted text file. It imports the data fine but I
have a question. The letter should only go out to people who have GR as
the value in the GR field. I used the IF statement to conditionalize
fields, however if the person does not have GR as the value it simply
makes a letter with all the merge fields blank. Is there a way to make
it only do letters for those with GR as the value?

And example of my current formula is:

{IF {MERGEFIELD GR} = "GR" "{MERGEFIELD "First_Name"}" ""}

I thought about removing the last set of quotation marks but I don't
know if that will break the logic. Any advice would be great. Thanks

Jonathan



  #3   Report Post  
jdawgnat
 
Posts: n/a
Default

Thank you - it worked like a charm.

Peter Jamieson wrote:
Assuming you are only producing one letter for each record in the data
source, or that it is always safe to ignore all records where the value in
GR is GR, try this:
a. make a backup copy of your document, just in case
b. remove the IF field
c. Use Tools|Customize to enable the Mail merge toolbar. Click the Mail
Merge Recipients button (typically the third from the left)
d. click the little arrow in the column heading of the "GR" column, and, if
Word lets you select the value "GR", do that, and the list of records should
be filtered. If you don't see a GR value, click the Advanced... option, and
specify the condition where the GR field equals GR. You should not need to
put any quotes around the GR.
e. Come out of the dialog box and save and close your document. Then try
opening it again to verify that Word has remembered its data source, and the
filter condition. If it has, you're probably OK and you should get what you
need. if not (and that may be the case in Word XP unfortunately), further
thought is needed...

Peter Jamieson

"jdawgnat" wrote in message
oups.com...
Good morning,

I have a letter in Word XP that I am using mail merge in order to
import from a ; delimitted text file. It imports the data fine but I
have a question. The letter should only go out to people who have GR as
the value in the GR field. I used the IF statement to conditionalize
fields, however if the person does not have GR as the value it simply
makes a letter with all the merge fields blank. Is there a way to make
it only do letters for those with GR as the value?

And example of my current formula is:

{IF {MERGEFIELD GR} = "GR" "{MERGEFIELD "First_Name"}" ""}

I thought about removing the last set of quotation marks but I don't
know if that will break the logic. Any advice would be great. Thanks

Jonathan


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
Insert source texts into multiple files and update automatically robfer Microsoft Word Help 9 September 12th 07 10:10 PM
Mail Merge with separate Source Header document KM Wagner Mailmerge 1 May 25th 05 10:23 AM
How Do You Mail Merging Hyperlinks Jeremy Newkirk Mailmerge 0 March 8th 05 06:56 PM
Mail Merge should allow you to use numbers and text within the sa. ozziebare Mailmerge 1 March 1st 05 08:33 PM
Outline Renee Hendershott Page Layout 2 December 25th 04 03:49 PM


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