Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Barry Osborne Barry Osborne is offline
external usenet poster
 
Posts: 1
Default mail merge selection criteria

I have a problem with XP mail merge. It seems to have developed since a
routine update.

When using selection criteria with an Excel database the system adds
additional rows and uses "or" so my careful two lines with "and" are
completely over ridden. I never used to add "none" so I have done that but
it still adds lines.

Specifically I am selecting one field as "blank" and another and "equal to".
If I put the "blank" field selection first, and then use "contains" instead
of "equal to" I can force it to work on this job. But that is not a proper
solution.

Am I doing something wrong or could the update have corrupted something?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default mail merge selection criteria

Hi Barry,

I have a problem with XP mail merge. It seems to have developed since a
routine update.

When using selection criteria with an Excel database the system adds
additional rows and uses "or" so my careful two lines with "and" are
completely over ridden. I never used to add "none" so I have done that but
it still adds lines.

Specifically I am selecting one field as "blank" and another and "equal to".
If I put the "blank" field selection first, and then use "contains" instead
of "equal to" I can force it to work on this job. But that is not a proper
solution.

Am I doing something wrong or could the update have corrupted something?

The update may have damaged something. I'm not using XP anymore (and I'm anyway
very leary of updates since some of the experiences this last year), so I can't
do any testing for you, only make some suggestions. If you're willing to work
with me to collect some information, I can report this to Microsoft to try to
get the "fix" fixed, and a way for you get your filtering done...

Can you give me the names of (some of) the fields you use for setting filters
(Query options)?

Then an exact example of the filter you usually can use.

An exact description of the changes Word makes so that it doesn't work after.

An exact description of the changes you make so that it "works for this job".

What you'll probably have to do is use VBA to set the query, rather than work
through the interface. This isn't too hard, really...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Barry Osborne Barry Osborne is offline
external usenet poster
 
Posts: 1
Default mail merge selection criteria

Cindy
Thank you for your helpful reply.
Among the fields are two that I am sorting on. One is "pletter" and the
other "email". Out of a list of around 500 entries I am selecting people who
have asked for a periodic letter and who do not have email (I use a group
mailing in Outlook for those on email). So the select criteria is "pletter
equal to y" and "email is blank".

Whichever way round I set that it puts adds "or email is blank". If the
"and pletter is equal to y" then follows it is OK. If I select in the other
order the "or email is blank" then selects all the entries where that
criteria is matched, and this includes many more than I want.

I did find that "contains y" provided a better control.

I am rather busy now so I will have to run some tests tomorrow and vary the
criteria to see what happens. However, the automatic additional "or email is
blank" should not happen.

My upgrade was IE7 and it messed up at least two other applications so I
uninstalled it and am back to IE6 with those programmes now working. I am
unable to be sure that the upgrade to IE7 was the cause; I had not noticed it
before.

Barry

"Cindy M." wrote:

Hi Barry,

I have a problem with XP mail merge. It seems to have developed since a
routine update.

When using selection criteria with an Excel database the system adds
additional rows and uses "or" so my careful two lines with "and" are
completely over ridden. I never used to add "none" so I have done that but
it still adds lines.

Specifically I am selecting one field as "blank" and another and "equal to".
If I put the "blank" field selection first, and then use "contains" instead
of "equal to" I can force it to work on this job. But that is not a proper
solution.

Am I doing something wrong or could the update have corrupted something?

The update may have damaged something. I'm not using XP anymore (and I'm anyway
very leary of updates since some of the experiences this last year), so I can't
do any testing for you, only make some suggestions. If you're willing to work
with me to collect some information, I can report this to Microsoft to try to
get the "fix" fixed, and a way for you get your filtering done...

Can you give me the names of (some of) the fields you use for setting filters
(Query options)?

Then an exact example of the filter you usually can use.

An exact description of the changes Word makes so that it doesn't work after.

An exact description of the changes you make so that it "works for this job".

What you'll probably have to do is use VBA to set the query, rather than work
through the interface. This isn't too hard, really...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)


  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default mail merge selection criteria

Hi Barry,

OK, let me be sure I understand you correctly. You're in the "Filter and Sort"
dialog box (where there are multiple lines) and you set

pletter | equal to | y
and
email | is blank |

Word then adds an additional line:

or
email | is blank

FWIW, when I test this (different field names, but same type of criteria) I see
the same with Word 2003 (IE6). What's more, it happens again and again each time
I display the dialog box. So I'm guessing this may be some other update than
IE...

If I use macro code, things appear to work correctly, although the "Filter and
Sort" doesn't show the filter I've set. For example:

Sub SetMergeFilter()
Dim SQl As String
Dim TableName As String
Dim Crit1 As String, Crit2 As String

TableName = "[Office Address List]"
Crit1 = "[First Name] = 'Cindy'"
Crit2 = "[Last Name] IS NULL"
SQl = "SELECT * FROM " & TableName & " WHERE " & Crit1 & " AND " & Crit2
ActiveDocument.MailMerge.DataSource.QueryString = SQl
End Sub

You'd basically only need to substitute the information for TableName, Crit1 and
Crit2. You could even build a form to enter this. But if you can find a
combination in "Filter and Sort" that works reliably, you may prefer that...

Among the fields are two that I am sorting on. One is "pletter" and the
other "email". Out of a list of around 500 entries I am selecting people who
have asked for a periodic letter and who do not have email (I use a group
mailing in Outlook for those on email). So the select criteria is "pletter
equal to y" and "email is blank".

Whichever way round I set that it puts adds "or email is blank". If the
"and pletter is equal to y" then follows it is OK. If I select in the other
order the "or email is blank" then selects all the entries where that
criteria is matched, and this includes many more than I want.

I did find that "contains y" provided a better control.

I am rather busy now so I will have to run some tests tomorrow and vary the
criteria to see what happens. However, the automatic additional "or email is
blank" should not happen.

My upgrade was IE7 and it messed up at least two other applications so I
uninstalled it and am back to IE6 with those programmes now working. I am
unable to be sure that the upgrade to IE7 was the cause; I had not noticed it
before.


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

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 process is printing out extra records Mike Mailmerge 3 September 27th 06 11:12 AM
Heavy Mail Merge Application Atul Mailmerge 1 August 17th 06 02:37 PM
How to get all mail merge fields in a document [email protected] Mailmerge 3 February 17th 06 05:43 AM
Envelope Mail Merge from .xls all records rather than selection Kara Mailmerge 3 February 7th 06 06:59 PM
Word-Excel 2003 - Mail Merge Recipients problem AYager Mailmerge 2 January 11th 05 04:11 AM


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