HOWTO: Using a FoxPro Database in a Word for Windows Print Merge

Last reviewed: February 20, 1998
Article ID: Q92966
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 3.0
  • Microsoft FoxPro for MS-DOS, versions 1.0, 1.01, 1.02, 2.0, 2.5x, 2.6x
  • Microsoft FoxPro for Windows, versions 2.5x, 2.6x
  • Microsoft Word for Windows, versions 1.0, 1.1, 1.1a, 2.0, and 6.0

Information from a Microsoft FoxPro database file can be converted for use in the print merge feature of Microsoft Word versions 1.x, 2.0, and 6.0 for Windows.

NOTE: Memo fields convert as blank fields. If the data in the memo field is required for the print merge, you must write a program to convert the data. Only Word versions 1.x and 2.x for Windows require that memo fields be converted.

Word Version 1.x

To convert a FoxPro database for use with a print merge in Word version 1.x for Windows, issue the following commands in the FoxPro Command window:

   USE <database>
   COPY TO <newfilename> TYPE DELIMITED

Here <database> is the name of the existing database and <newfilename> is the name of the intermediate format file. FoxPro automatically appends the .DBF extension to the filename.

Word Version 2.0

To convert a FoxPro database for use with a print merge in Word version 2.0 for Windows, issue the following commands in the FoxPro Command window:

   USE <database>
   COPY TO <newfilename> TYPE FOXPLUS

where <database> is the name of the existing database and <newfilename> is the name of the intermediate format file. FoxPro automatically appends the .DBF extension to the filename.

Word Version 6.0

In Word version 6.0, you can use ODBC to directly read in the FoxPro database.

NOTE: See Q157767 for information on downloading the ODBC driver for Visual FoxPro.

  1. Start Word version 6.0.

  2. From the Tools menu, choose Mail Merge. Then choose the Create button under Main Document. Edit your main document as needed.

  3. From the Tools menu, choose Mail Merge, choose the Get Data button under Data Source, and then choose Open Data Source.

  4. Select "MS FoxPro Files (*.DBF)" from the List Files Of Type box, and then select the FoxPro database.

    NOTE: If "MS FoxPro Files (*.DBF)" is not available, you must install the data access (ODBC) utilities using the Word Setup program.

REFERENCES

For additional information, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q157767
   TITLE     : PATCH: Vfpodbc5.exe Visual FoxPro ODBC Driver Version 5.0

Keywords          : FoxDos FoxWin FxinteropOdbc vfoxwin
Version           : 1.0 1.01 1.02 2.0 2.5x 2.6x 3.0
Platform          : MS-DOS WINDOWS
Issue type        : kbhowto


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 20, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.