Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Attaching datasource to Word XP
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00709221
Message ID:
00709340
Views:
23
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform