next record if problems

J

Jose

using: MS Office 2003 SP1

Let me first try to explain what I am trying to do.

I am trying to using word to print address labels if and only if
certain conditions are met. I first start by opening a comma
delimited text file with about 15 collumns. If two of these collumns
contained matched fields, I would like a label to print.

Right now, I kind of have this working. I, however in my data file,
have put examples which should pass (i.e. print) and examples which
should fail (i.e. not print.) I have found however, if I put two or
more failed entries in the data file, next to each other, the second
failed entry will always print. (i.e. even failed number of entries
print, odd numbers do not)

I am trying to match on two tests

1) if Item_ID = "calendar" && Type = "payment recieved" then print
the <<address>> field as well as some other fields and a graphic.
(see below .doc file)

2) if the above fails, go to the next record and test again.

I can easily do this in perl, but I can't figure it out here.

if you would like to see the word file and data file go to the
following url.
http://sagansstash.ucsd.edu/Help
Both the .doc file and .csv file are there. I have put, in the
address fields a line which says pass or fail. No failed labels
should print.

If you can tell me how to get this working, I would be very happy and
greatful.

Thanks for your time. Feel free to email me if you have any
questions.

jose
 
P

Peter Jamieson

Assuming that you simply want a lable if Item_ID = "calendar" && Type =
"payment recieved" and not otherwise, the way to do this in Word is to use
the recipients box to define a filter. Either find the recipients button in
the Mail Merge Task Pane, or use Tools|Customize to display the mail merge
toolbar, then click the recipients button (3rd from the left). You can
define the filter conditions by using the drop-downs at the top of the two
relevant columns to pick the values you need or you can choose the Advanced
option at the bottom of the dropdown and fill in the dialog box. You are
only allowed a few simple conditions. Unused labels at the end of the sheet
will have trim (eg. the logo) printed on them. With this data source, the
filter conditions should persist a File|Close, but be aware that there have
been problems with filters and sorts with some types of data source.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top