General information
Category:
COM/DCOM and OLE Automation
Title:
Error 1426 unknown name
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only