mailmerge and Visual Foxpro

M

Mark

Hi,
I connect to a VFP Database via ODBC DSN and open the requested table. The
data is displayed in its natural order. I click on the name field to have the
order set to "name". I return to my mailmerge lables and save my word.doc.
Next time when I open the doc, the data is displayed in natural order again
and I have to repeat the silly task of setting the wanted order.
Any hint.
Thank you
Mark
 
D

Doug Robbins - Word MVP

I don't know anything about VFP, but if you were using Access, I would
suggest creating a Query in which the data was sorted by the Name field and
use the Query as the data source.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
P

Peter Jamieson

Which version of Word? Which SP?

Which version of the VFP driver (you cna find out in the ODBC
administrator).

Are you connecting to a DBF that you select in "Select Data Source", or a
dbc?

Can you open the visual basic editor and in the immediate window type

print Activedocument.Mailmerge.Datasource.Querystring

and post the results here? If so, it would help if you could post the result
a. before you sort
b. immediately after you sort
c. after you close and re-open the document

The value of ActiveDocument.Mailmerge.Datasource.connectstring would also be
useful.

If you are using Word XP, attempting to see those values may crash Word, in
which case, you may be able to see what query Word is using by
a. saving as a Web page, complete and closing
b. checking Word Tools|Options|General|Confirm Conversions at open
c. opening the .htm file you saved, specifying plain text when the
converter dialog box comes up (or ignore (b) and just open the .htm file in
Notepad)
d. finding the block of Datasource information and extracting the query
string and connect string from there.

Peter Jamieson
 
D

Doug Robbins - Word MVP

I am not sure that it would be double work. It would only have to be done
one time.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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