Problem narrowing down recipient list, please help!

T

Tim Bocek

In Word 2003, I have an excel file that I have imported into Word to use as a
recipient list in a mail merge. I want to limit the recipients by selecting
blanks in one field and nonblanks in another. The first field appears to
work fine; however, the second selection criterion doesn't seem to work! If
I close the "mail merge recipients" window and go back into it, the second
field is set to "all" and has both blanks and nonblanks as if I didn't set
any criterion at all! To make matters stranger, if I click on the arrow next
to the field and say "advanced", both criteria are still listed in the query.

Any ideas? Even a hack or workaround would be helpful at this point, but I
need to solve this and I'm getting desperate. Please help!
 
P

Peter Jamieson

I can't test this right now, but just some thoughts...
a. do you need to import into Word first? Can you use the Excel data source
directly? If so, do the same problems occur?
b. are the Word fields definitely /blank/ (i.e. strings with no content -
or do they have spaces in them) ?
c. can you issue your query in VbA using the OpenDataSource method, where
you can specify slightly more accurate SQL, e.g. something along the lines
of

SELECT * FROM mydatasource WHERE (field1 = '' or field1 is null) AND
(field2<>'' and field2 is not null)

Peter Jamieson
 

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