Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Attaching datasource to Word XP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00709221
Message ID:
00709340
Vues:
24
Lee,

I just recently had the exact same problem and all I did was to keep the code exactly the same as it had previously been to run with other versions of Word, I just make the change below to tell word to use the Word2000 ODBC DataSource if it was the XP version.

The code I use is as follows:
lcDSN = "DSN="+lcDSN+";SourceDB="+FullPath(lcDBC)+";SourceType=DBC;"
lcSQLStatement = [SELECT * FROM ]+lcTable

If This.WordVersion = 10
  .OpenDataSource(,,,.T.,,,,,,,,lcDSN,lcSQLStatement,,,wdMergeSubTypeWord2000)
Else
  .OpenDataSource(,,,.T.,,,,,,,,lcDSN,lcSQLStatement)
EndIf
HTH
Caroline
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform