MDAC 2.5 SDK - Visual FoxPro ODBC Driver
Creating Mailing Labels in Microsoft Word Using Visual FoxPro Data
You can use Visual FoxPro data in a Microsoft Word for Windows 95 or Windows 98 document. For example, you might want to create mailing labels from the customer information stored in a Visual FoxPro table.
To create mailing labels
- In Microsoft Word, create a new blank document.
- From the Tools menu, choose Mail Merge.
- In the Mail Merge Helper, choose Create and then select Mailing Labels.
- Under Main Document, choose Active Window.
- Under Data Source, choose Get Data and then select Open Data Source.
- In the Open Data Source dialog box, choose MS Query.
- In the Select Data Source dialog box, select a Visual FoxPro data source and then click Use.
- If the database accessed by your data source includes tables, select a table from the Add Tables dialog box. Microsoft Query displays the added table in the top half of the query designer.
- Select fields for your query by dragging them from the table onto the lower half of the designer.
- From the File menu, choose Return Data to Microsoft Word. Microsoft Query closes, and the data you selected is available for use in your mail merge document.
- Under Main Document, choose Setup.
- In the Label Options dialog box, select the printer and label information you want and then click OK.
- In the Create Labels dialog box, select the fields you want to print on the mailing labels and then click OK.
- In the Mail Merge Helper, under Merge the Data with the Document, click Merge.
- In the Merge dialog box, select the options you want and then click Merge.