Edit recipient list causes "cannot find its data source" in Word 2002.

L

Les Mercer

My problem involves mailmerges that work under Win98 SE, Access 2000 SP3 and
Word 2000 SP3, but give problems under Win XP Professional 2002 SP1, Access
2002 SP3 and Word 2002 SP3. MSKB and Google have failed to come up with even
a mention of the problem, let alone a solution.



I have an Access table called MMSource that contains numerous records with a
field called LetterType.

I have several Word mail merge documents, L100.doc, L200.doc, L300.doc etc,
that use MMSource as their data source.

At this point, old and new versions work the same.



But when I introduce the filter into Word using "Edit recipient list" to
select, e.g., LetterType=100, the problem starts.



Providing you use the original documents that were created in Word 2000, all
still works as long as you do not have to amend the name or location of the
data source.

But if you change things, or create a new mail merge document from scratch
using Word 2002 the problem occurs.



The filter works... until you save and close the document. When you reopen
the document you then get the message "this is a mailmerge main document.
Word cannot find its data source".



Originally the Access DB was on a network drive, so in case it was a
permissions problem, I moved it to my C:, pointed the document to the new
location. The problem still occurs.



I added the following code in the hopes that it would give info when I
opened the document, but I got the "...this is a mailmerge main document.
Word cannot find its data source" message first, so it was no help.

Private Sub Document_Open()

MsgBox "activedocument.MailMerge.DataSource.Name=" & vbCrLf &
ActiveDocument.MailMerge.DataSource.Name

MsgBox "activedocument.MailMerge.DataSource.ConnectString=" & vbCrLf &
ActiveDocument.MailMerge.DataSource.ConnectString

MsgBox "activedocument.MailMerge.DataSource.QueryString=" & vbCrLf &
ActiveDocument.MailMerge.DataSource.QueryString

End Sub





I have created demo versions of Access 2000 and 2002 DBs and documents to
illustrate the bug that I can send if required (total 325KB unzipped)



Has anyone else experienced this problems, and what is the fix?

Thanks

Les Mercer
 
C

Cindy M -WordMVP-

Hi Les,

What you describe is a known problem that has been alleviated in Word 2003,
mostly. The problem comes from the way the Recipients dialog box stores the
filter + something weird with how the connection to Access and Excel are
stored.

1. Try using Query Options rather than the Recipients dialog box. (Can be
accessed through the "Advanced" entry at the end of any of the lists, or by
adding the older functionality to your mail merge toolbar. You'll find a table
of the old commands in the Mail Merge FAQ, Word 2002 section of my website)

2. You may also need to use the older DDE or ODBC connection methods (rather
than the new OLE DB default). Instructions for this are in the same location.
My problem involves mailmerges that work under Win98 SE, Access 2000 SP3 and
Word 2000 SP3, but give problems under Win XP Professional 2002 SP1, Access
2002 SP3 and Word 2002 SP3. MSKB and Google have failed to come up with even
a mention of the problem, let alone a solution.

I have an Access table called MMSource that contains numerous records with a
field called LetterType.

I have several Word mail merge documents, L100.doc, L200.doc, L300.doc etc,
that use MMSource as their data source.

At this point, old and new versions work the same.

But when I introduce the filter into Word using "Edit recipient list" to
select, e.g., LetterType=100, the problem starts.
Providing you use the original documents that were created in Word 2000, all
still works as long as you do not have to amend the name or location of the
data source.

But if you change things, or create a new mail merge document from scratch
using Word 2002 the problem occurs.

The filter works... until you save and close the document. When you reopen
the document you then get the message "this is a mailmerge main document.
Word cannot find its data source".

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

Les Mercer

Thanks Cindy for responding. I will most definitely try what you suggest.
Because of the urgency of the requirement I had to find a workaround. So I
wrote several queries in Access called DataForL100, DataForL200 etc, each
selecting its own records from the MMSource table. I then pointed the Word
documents to its corresponding Access query.
Interestingly, another difference I have noticed between the 2000/2002
versions of Word/Access is that when you open a Word2000 mailmerged letter,
it opens the Access2000 database in a background window and runs any
autoexec macro on the database. In 2002, you just get the data into the Word
document without Access apparently opening, and definitely without the
autoexec running.
Regards, Les.
 
C

Cindy M -WordMVP-

Hi Les,
Because of the urgency of the requirement I had to find a workaround. So I
wrote several queries in Access called DataForL100, DataForL200 etc, each
selecting its own records from the MMSource table. I then pointed the Word
documents to its corresponding Access query.
That's a good approach, and actually preferable, IMO :)
Interestingly, another difference I have noticed between the 2000/2002
versions of Word/Access is that when you open a Word2000 mailmerged letter,
it opens the Access2000 database in a background window and runs any
autoexec macro on the database. In 2002, you just get the data into the Word
document without Access apparently opening, and definitely without the
autoexec running.
Right :) Prior to Word 2002 the default connection method for both Excel and
Access was DDE. (In Word 2002 and later it's OLE DB). DDE has to actually
start up the application and communicate with the application interface. OLE
DB (and ODBC) connect directly to the stored data, without opening the
application.

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 :)
 

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