Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / June 2007

Tip: Looking for answers? Try searching our database.

Next Record If Question (Word 2003)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark Watlock - 26 Jun 2007 21:48 GMT
It is my understanding that inserting the Next Record If statement in a mail
merge would allow me to only merge records that meet the criteia I set .  I
do not seem to be able to make this work.  (Next Record If = Chicago should
only return records with Chicago in the city field)

I can use the Skip Record If command to restrict merged records to whatever
criteria I choose.  I am using the Insert Word Field command from the Mail
Merge toolbar.  I understand that I could filter the data source but I would
like to make this work.

Thank you in advance!
Peter Jamieson - 27 Jun 2007 09:12 GMT
> (Next Record If = Chicago should
> only return records with Chicago in the city field)

Not really. What <<Next record if>> does is move to the next record if the
current record meets the criteria. However, it does not then /re-evaluate/
the condition - Word evaluates each field in the Mail Merge Main Document
sequentially (and does whatever it does in nested fields) - it never loops.

So if you have your <<Next record if>> at the beginning of your mail merge
main document and you have records like

1. Los Angeles
2. Chicago
3. New York
4. Chicago
5. Chicago
6. Houston
7. Chicago
8. Chicago
9. Chicago
10. Chicago
11. Las Vegas
.
Word should produce output for

1,3,5,6,8,10,11 (I think!) which contains some Chicagos.

When encounters a Skip Record If and the criteria are met, the difference is
that it cancels processing of the current copy of the mail merge main
document. So in the simple case where you have a skip record if Chicago at
the beginning and no <<next record>> fields it does behave as if you had
excluded all the Chicago records from the data source. However, if for
example you have a label merge with a Skip record if Chicago in each label,
then Word will cancel the current page of labels (including non-Chicago
records) as soon as it encounters a Chicago record. If you have 21 labels
per sheet and Chicago appears somewhere in every 21 records then you get no
output.

It is easy to get the impression from Word Help over the years that
Microsoft "deprecated" { SKIPIF } a long time ago as it recommends that you
use the filtering options. But of in fact none of these approaches does
eaxctly the same thing. Personally I think there is at least one field
missing - what is needed is something like a { NEXT UNTIL } or some such.
But I think Microsoft's view has probably long been "anything more
complicated than the simplest mailmerges is something you ought to get
programmed using VBA or .NET"

Peter Jamieson

> It is my understanding that inserting the Next Record If statement in a
> mail
[quoted text clipped - 12 lines]
>
> Thank you in advance!

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.