Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Manipulation Through VFP
Message
 
À
07/08/1998 15:00:54
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00124749
Message ID:
00125235
Vues:
68
>Kevin,
>.insertdatabase(..) is the ODBC connection code. In word opening a new doc or changing active doc switches to another window. Have you looked or run the code ? If not run yet create the template c:\temp\prttest.doc (or change name to whatever you want in code also). Changing the link to source parameter to 1 would also link it to FoxData (here embedded).
>Cetin
>

Cetin,
I think I understand what you are doing but when I try to run the following code I get a mismatch error.

oword = createobject("word.basic")
oword.appshow && Show Word App - Word 7.0 Support
oword.filenewdefault && New file, default template - Will create datasource
cDSN = "DSN=Visual FoxPro Tables;UID=;PWD=;"
cSourceDb = "SourceDB=C:\AMM\TEM12.DBF"
cSourceType = ";SourceType=DBC;"
cOther = "Exclusive=No;BackgroundFetch=No;Collate=Machine;"
* Insertdatabase parms build here for clarifying
* 35,511 are autoformatting options for grid - ignore
* 0 Link to source false
** The following line gives me the mismatch error
oword.InsertDatabase(35,511,0,cDSN+cSourceDb+cSourceType+cOther,,,,,,,,,1)
oword.filesaveas("c:\temp\xxmmergedoc",0) && Save as a word doc for mailmerge
oword.fileclose(1) && Close saving
* Datasource ready, now create mailmerge main document

Any ideas?
Kevin Scott
kehvn@carolina.rr.com


Hey! It's not my fault. It's some General named Protection!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform