Suche

Alle Produkte | Support | Suche | Microsoft.com Guide
Home Knowledge Base Suche FAQs Downloads Newsgroups Kontakt Seite empfehlen Drucken Hilfe
HOWTO: Automate Mail Merge to Word97 SR-1 Using OLE and ODBC (Q181926)
The information in this article applies to:
Microsoft Visual FoxPro for Windows, versions 3.0 , 3.0b , 5.0 , 5.0a , 6.0
Microsoft Data Access Components version 2.5
SUMMARY
This article demonstrates how to use OLE automation to create a mail merge in Word for Windows 97 SR-1 using data from a Visual FoxPro
(VFP) for Windows table.
MORE INFORMATION
Below is the Visual FoxPro for Windows code using the Word.Application object model that performs the mail merge using an ODBC data
source to an existing Visual FoxPro table. This code can use an existing data source name (DSN), created in the ODBC Driver Manager, or it
can create one on the fly utilizing an API call to add and use the DSN. In the example below, "Visual FoxPro Tables" is the DSN created in
the ODBC Driver Manager and is pointing the VFP5a\Samples\Data folder. These paths will most likely have to be changed to reflect the
users' paths.
NOTE: This code only works with the Service release-1 (SR-1) for Word 97. Using prior versions of Word 97 causes a Type Mismatch and
other OLE errors.
Create a program and enter the following code:
1 von 8
07.01.02 09:41

Summary of content (48 pages)