using MSquery as data source for MSword97 mail merge

W

windsurferLA

If I'm in wrong news group for these questions, please redirect me.

I'm simultaneously trying to transition to oldest computer (Win98) to my
newest computer (WinXP pro), and from Office95 to Office97. I've
procrastinated on making the transition because I've never been able to
get the mail merge to work right using Office97. The mail merge worked
great on my Win98SE computers when I first installed Office97, but I
could never get it to work after doing a Microsoft recommended update to
the ODBC driver files. The current machine's installation of Office97 is
a virgin copy from an original authentic MicrosoftCD, except it has all
the current Microsoft recommended updates. The operating system is
WindowsXP professional.

On an old Windows98 computer, I use MS-Query95 to selected records from
a dbaseIII data base, let's call it ALL-TENANTS.dbf. I then would save
selected records in a dbaseIII format under a different file name, let's
call it CHOSEN-TENANTS.dbf I would then open up MS-Word95 and do a
mail merge using CHOSEN-TENANTS.dbf as the data source. A two step
process, but it has worked every time for many years.

At one point on my newest WinXP machine using the old MSWord95 .doc
file, the old .qry file, and the original .dbf data base file, I got
MS-Word97 to open MS-Query97, and merge the records specified by the
..qry query file with the MS-Word97 form letter to generate the form
letters. However, after updating the query, MS-Word97 could no longer
find the data source even though I can lead it to the file in accordance
with the various pop-up dialogue boxes.

QUESTION 1. How does one save the results of a .qry97 file as a .dbf
file. As I recall, in MS-Query95, one did a SAVEAS, and the result of
the query was saved in the selected format. In MS-Query97, I'm not
offered a .dbf alternative. The two alternatives are .qry and .dqy. By
the way, when I later tried to open the .dqy file, my machine said that
it did not recognize the file format. When I went to a Microsoft site
to research the .dqy suffix, it claimed it was not a Microsoft suffix,
but additional research showed that it is a format Microsoft uses to
transfer data into MS-Excel. How do I save results of a MS-Query the
simple tab delimited file format commonly known as dbaseIII?

QUESTION 2. When I try to specify the .qry file as the data source for
the MS-Word mail merge, it seems to take me through all the steps to
identify the file without protest, but when I get to the end and want to
merge, it says it can't find the data file. Can I specify a .qry file as
the data source for a MS-Word mail merge?

QUESTION 3. Opening a .qry file on my WinXP machine takes at least four
times as long as opening a .qry file on my Win98SE machine, even though
the CPU on the new WinXP machine is nearly twice as fast as than on the
older Win98SE machine. Admittedly, the version of MS-Office97 may not be
precisely the same as they were loaded from different (authentic) CD's,
but I suspect some other inconsistency is the cause of the delay.
 
W

windsurferLA

This is more information on problem..

(1) I reloaded Office 97 files from CD

(2) Open word file,
In case A, deleted all fields from document.
In case B, inserted fields from the dbase file that is source for Query.

(3) went to Mail Merge Helper, selected Get Data.

(4) Went to Open Data Source, and selected MSQuery button on right.

(5) Clicked on Query Tab and found existing Query listed. Opened that
Query. That Query displayed the desired data correctly.

(6) Went to File/Return-data-to-Microsoft-word. Immediately got the
error message: "Word unable to open the data source."

If I try to go back to MS Word document before going to
File/Return-data-to-Microsoft-word, my machine hangs up. The only way
to unlock the machine is with control-alt-delete. It then sends an
error report to Microsoft.

WHY IS WORD UNABLE TO OPEN THE DATA SOURCE?
 
C

Cindy M -WordMVP-

Hi WindsurferLA,
I'm simultaneously trying to transition to oldest computer (Win98) to my
newest computer (WinXP pro), and from Office95 to Office97. I've
procrastinated on making the transition because I've never been able to
get the mail merge to work right using Office97. The mail merge worked
great on my Win98SE computers when I first installed Office97, but I
could never get it to work after doing a Microsoft recommended update to
the ODBC driver files.
Right, the newer versions of MDAC have quite different ODBC drivers than the old Win98 ones, which is probably behind a lot of your problems.

I'd like to approach this from a slightly different angle, since you do want to modify (select) the data you want to merge to. Excel usually has fewer problems dealing with these changes than mail merge, so...

Can you import that dbf file into Excel using MS Query (via the Data menu)? And then link the mail merge to that?

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

windsurferLA

Thanks for hints.

I have since tried two approaches for MailMerge into Word97, neither of
which has been successful for unknown reasons.

Approach I - [I could not get Query to select records from Excel.]
(1) Open dbaseIII data file with Excel and saved it as an Excel file.
(2) Use Query to select records from the Excel file (NO WORK)
(3) Use the Query on Excel as the data source for Word. (NOT TESTED)

Approach II - (I could not get Query to save results of query.)
(1) Use Query to select records from dbaseIII data files (WORKS)
(2) Save Query query results as an dbaseIII file. (DOESN'T WORK)
(3) Use dbaseIII file as data source for Word. (WORKS)

Approach II should be straight forward, but judging from the Query
Manual provided with Microsoft Office, it is anything but intuitive.
According to Microsoft's manual, when "Saving a Query's Result Set as a
Table," you have to open the dialog box "select data source." One of my
problems is that none of the prompts lead to such a dialog box. That is
independent of the fact that when seeking to save data, among the last
things I would think of doing is looking for an option called "select
data source." IT WOULD SEEM TO ME THAT A FUNDAMENTAL CAPABILITY OF
QUERY WOULD BE TO BE ABLE TO SAVE THE RESULTS OF A QUERY AS A NEW
"TABLE," AND SO I'M TRYING TO FIGURE OUT HOW TO DO THAT.

I also have MS-Access on my machine, and I might try using it to do the
Query, but I'm not really familiar with Access.

Michael
 
C

Cindy M -WordMVP-

Hi WindsurferLA,

I suggest try importing the dbf data into Excel via the Data menu, as I
suggested. Then select this Excel file as the mail merge data source. I
think this would be the easiest way for you.

MS Query is really part of Excel, which means Excel will always work well
enough with it, but Word may not. As a matter of fact, the last time Word
really worked well with it was back in Word 6/95 :) Another factor you may
be encountering when trying to do mail merge with MS Query is the fact that
the SQL statement MS Query is generating may not exceed 255 characters; if
it does, it will bomb out with the error message you describe.

You can certainly link the dbf table into an Access database, then use the
Query interface there. You'll find it to be very similar to that in MS
Query, but with more options.
Approach I - [I could not get Query to select records from Excel.]
(1) Open dbaseIII data file with Excel and saved it as an Excel file.
(2) Use Query to select records from the Excel file (NO WORK)
(3) Use the Query on Excel as the data source for Word. (NOT TESTED)

Approach II - (I could not get Query to save results of query.)
(1) Use Query to select records from dbaseIII data files (WORKS)
(2) Save Query query results as an dbaseIII file. (DOESN'T WORK)
(3) Use dbaseIII file as data source for Word. (WORKS)

Approach II should be straight forward, but judging from the Query
Manual provided with Microsoft Office, it is anything but intuitive.
According to Microsoft's manual, when "Saving a Query's Result Set as a
Table," you have to open the dialog box "select data source." One of my
problems is that none of the prompts lead to such a dialog box. That is
independent of the fact that when seeking to save data, among the last
things I would think of doing is looking for an option called "select
data source." IT WOULD SEEM TO ME THAT A FUNDAMENTAL CAPABILITY OF
QUERY WOULD BE TO BE ABLE TO SAVE THE RESULTS OF A QUERY AS A NEW
"TABLE," AND SO I'M TRYING TO FIGURE OUT HOW TO DO THAT.

I also have MS-Access on my machine, and I might try using it to do the
Query, but I'm not really familiar with Access.

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