Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error 1426 unknown name
Message
From
30/10/2002 17:14:20
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Error 1426 unknown name
Miscellaneous
Thread ID:
00717144
Message ID:
00717144
Views:
42
Hello,

The following code worked in word 2000 but does not in wordxp.
The only change I mase was Word.Basic to Word.Application.
It errors below.

Why ???

Thanks,

-Greg

cDoc=alltrim(str(thisform.lstWP.ListIndex))+'.doc'
cDoc="'&mvTempPath"+cDoc+"'"
mvTempPath=fullpath(curdir())
mvTempMerge=(mvTempPath)+'merge.dbf'

oWord = CreateObject("Word.Application")

WITH oWord
.Visible=.T. && Make Word visible.
.FileNewDefault
.MailMergeMainDocumentType(0)

cODBCSource = "DSN=Visual Foxpro Database;SourceDB=&mvTempPath;;
SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;"

Here is where it errors-v
.MailMergeOpenDataSource("c:\proj2000\data\merge.dbf",0,0,1,0,"","",0, ;
"","","DSN=FoxPro Files;DBQ=&mvTempPath;DefaultDir=c:\proj2000\data ;
Deleted=1;DriverId=24;JetIniPath=odbcddp.ini;Statistics=0;", ;
"SELECT * FROM merge.dbf","")
Next
Reply
Map
View

Click here to load this message in the networking platform