Mailmerge error when performing a query

L

Luc

Windows Xp professional, Word 2002 (10.5815.4219) SP2
I have the following problem in my classroom that is driving me crazy: I
have seven "identical computers" which have all been installed in the same
way with the above mentioned software.

A data table has been created in Word. Now we are trying to do several
mailmerges using selections. To do this there seem to be two possibilities:
click on the arrow next to one of the titles in the data table and choose
advanced which brings you in the dialogue we where familiar with in Word
2000 and previous versions. The second is to click on the button "edit" and
then choose the one but last button which brings you in the same dialogue
mentioned above. Now the problem regularly the following message appears
upon clicking on the button edit "Operation could not be completed because
of dialog or database failure. Please try again later (this is a translation
from Dutch so excuse me if the wording is not 100% accurate). From that
point on nothing seems to work, the only solution is to shut down the
computer completely and start over. Sometimes the problem occurs shortly
after a selection has been made and the table shows a correct selection but
upon completing the wizard the selection is not applied. Upon checking the
dialogue Word seems to have added an extra selection key.

I should add that we are not using the outlook contacts list but simply
creating letters with a Word data table. The problem occurs on all computers
but randomly you cannot predict on which computer the problem will occur. I
have searched the knowledge base from Microsoft and the newsgroups in Google
but to no avail.

Is there anyone out there with the same problem, better yet someone who can
provide me with a workable solution.

Thanks

Luc
 
C

Cindy M -WordMVP-

Hi Luc,

1. Is this a Word table, or an Access table created using the newer Word 2002
mail merge interface?

2. There is one hit in the KB on the error message (Article WD2002: "Operation
Could Not Be Completed Because of Dialog or Database Engine Failure" Error
322215) but that doesn't really correspond to what you're describing.

3. Do I correctly understand you that the problem does not come when trying to
set query options, but only has to do with clicking "Edit"?

4. Is this data source stored on the local machine, or in a network location?

5. When you say "from this point on nothing seems to work" do you really mean
"nothing on the computer", "nothing in Word" or just this mail merge?

6. I don't understand what you mean by "extra selection key"? Can you be more
specific in your description?

Basically, the error message means that the (OLE DB) connection to the data
source can't be made, or properly maintained.
A data table has been created in Word. Now we are trying to do several
mailmerges using selections. To do this there seem to be two possibilities:
click on the arrow next to one of the titles in the data table and choose
advanced which brings you in the dialogue we where familiar with in Word
2000 and previous versions. The second is to click on the button "edit" and
then choose the one but last button which brings you in the same dialogue
mentioned above. Now the problem regularly the following message appears
upon clicking on the button edit "Operation could not be completed because
of dialog or database failure. Please try again later (this is a translation
from Dutch so excuse me if the wording is not 100% accurate). From that
point on nothing seems to work, the only solution is to shut down the
computer completely and start over. Sometimes the problem occurs shortly
after a selection has been made and the table shows a correct selection but
upon completing the wizard the selection is not applied. Upon checking the
dialogue Word seems to have added an extra selection key.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
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 :)
 
L

Luc

Hi Cindy, thanks for your reply!
I knew I could count on you to help me out. Sorry if my English is not so
good. I am working on the Dutch version and it isn't easy to translate the
terminology <g>.

Here are the answers to your questions:

1. This is an Access table created via the taskpane wizard, step 3, type a
new list (not sure about the wording here).
2. thanks for the article
3. Affirmative, we perform several filtering sessions one after the other
and execute the mailmerge (step 6), print the resulting document, then close
it without saving, which leaves us with the main document. Then we return to
step 3 by means of the taskpane and repeat the process with another query.
The error message occurs upon clicking the edit button in the data table,
our intention is to get to the filtering screen and perform another query
with new fresh conditions.
4. The data source is located on the local machine, in fact it is in the
directory "my data sources" which is suggested by Word when you save the
table for the first time.
5. By this I mean that Word still works, the mailmerge does not allow you to
click on the edit button but you still can choose the arrow next to the
header and choose advanced and perform a query. The result is correct in the
table (only the wanted records remain), but when you proceed to step 6 and
complete the merge there are too many letters produced, it is as if the
query is ignored for some reason.

6. When you return to the advanced filtering dialogue (step 3) Word seems to
have added an extra condition next to the ones we put in ourselves.
I sincerely hope I have been more clear than the first time. Hopefully you
will be able to help me.
Best regards
Luc
 
C

Cindy M -WordMVP-

Hi Luc,

I've been going by this for a week now, hoping a light-bulb would pop up
giving me a wise and useful answer <sigh> But no such luck.

I'd say that somewhere in memory Word is getting things mixed up. I don't know
enough about the internal workings of this to be sure what it could be, but
it's likely caused by continually changing the criteria in the same document
during the same session.

1. I'd be curious if removing ALL criteria, then running a merge, might not
clear this up when it occurs? Or, alternately, a macro that resets the
QueryString to a general setting:

Sub ResetQuery()
ActiveDocument.MailMerge.DataSource.QueryString _
= "SELECT * FROM `Office Address List`"
End Sub

2. I also wonder if avoiding the Recipients dialog box might make a
difference. You can pull the MailMerge... command from
Tools/Customize/Commands, category All commands and put it on a toolbar.
There's a "Query options" button in there that takes you directly to the
"Advanced" dialog box.
1. This is an Access table created via the taskpane wizard, step 3, type a
new list (not sure about the wording here).
2. thanks for the article
3. Affirmative, we perform several filtering sessions one after the other
and execute the mailmerge (step 6), print the resulting document, then close
it without saving, which leaves us with the main document. Then we return to
step 3 by means of the taskpane and repeat the process with another query.
The error message occurs upon clicking the edit button in the data table,
our intention is to get to the filtering screen and perform another query
with new fresh conditions.
4. The data source is located on the local machine, in fact it is in the
directory "my data sources" which is suggested by Word when you save the
table for the first time.
5. By this I mean that Word still works, the mailmerge does not allow you to
click on the edit button but you still can choose the arrow next to the
header and choose advanced and perform a query. The result is correct in the
table (only the wanted records remain), but when you proceed to step 6 and
complete the merge there are too many letters produced, it is as if the
query is ignored for some reason.

6. When you return to the advanced filtering dialogue (step 3) Word seems to
have added an extra condition next to the ones we put in ourselves.
I sincerely hope I have been more clear than the first time. Hopefully you
will be able to help me.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
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 :)
 
L

Luc

Cindy,
Thanks for all your efforts trying to solve my problem. Talk about
comittment !!! I have been reading the newsgroup for quite a while now and
have always found your answers to be 100% accurate. So if you do not find a
solution chances are no-one will.

As you mentioned in your reply problems do tend to be less when one takes
the queries one by one, repeating the whole merge from scratch. I have been
teaching Word starting with version 6 and have always had problems with
this, but never as much as in version Word 2002. I also realise that the way
I tackle these queries maybe what is causing the trouble. You could call
this heavy duty work as I am obviously pushing Word to the limit. It is my
opinion that a well written peace of software should allow to do this. Users
often perform a query and find the end result does not meet their criteria
and go back to do a better job.

Removing ALL criteria did help in previous versions of Word. Not so in Word
2002.

I had allready taken into consideration your suggestion to put the mailmerge
command in the toolbar, but decided against it because this means reverting
to a previous version of Word. People learning Word from scratch have
difficulties understanding why there should be different ways or procedures
to follow in performing a task. For people updating from a previous version
this could be valuable and an alternative to consider.

One question concerning the macro you suggested, should it be performed
after every query you perform or only when the problem occurs? I will test
it and see if this solves the issue and report back.

Again, Cindy, thanks for investing your time in this.

Luc
 
C

Cindy M -WordMVP-

Hi Luc,
So if you do not find a
solution chances are no-one will.
Oh, that's not said :) Often, it can turn out to be a matter of a different
point of view, or a particular experience. In this case, however, I do
imagine we're running into some kind of "memory leak"...
You could call
this heavy duty work as I am obviously pushing Word to the limit. It is my
opinion that a well written peace of software should allow to do this.
Oh, no question about that; I agree with you completely. If the question
came up more often, something might even be done about it :) FWIW, this is
the first time I've heard of it, so it probably isn't at the top of the "bug
hit list" <g> The other factor is reproducibility. If a problem can't be
reproduced with some reliability, it's very difficult to track down the
possible cause. And memory leaks are especially elusive...
Removing ALL criteria did help in previous versions of Word. Not so in Word
2002.
Now *that's* interesting. It makes me wonder how much the connection method
(OLE DB vs DDE?) has to do with the problem? Or using an Access database
instead of a Word table?
One question concerning the macro you suggested, should it be performed
after every query you perform or only when the problem occurs? I will test
it and see if this solves the issue and report back.
Either way. I'd first try "just when it glitches", though.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
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 :)
 
P

Peter Jamieson

Something that might help you pinpoint what is happening (even if it does
not help fix the problem) is to save your merge document in HTML format. If
you then open it as a text file you can see what Word has set up as the
mailmerge source, query, etc.

BTW this was also orginally a suggestion from Cindy :)
 

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