General information
Category:
COM/DCOM and OLE Automation
Title:
Ole IDispatch exception code 0 Error 1429
I get this error and it says Word could not open the data source.
The code below worked using Word 95, 97 and 2000. It does not work using XP.
We are are using VFP 6.
Any ideas ???
Thanks,
-Greg
mvTempPath=fullpath(curdir())
mvTempMerge=(mvTempPath)+'merge.dbf'
cDoc=alltrim(str(thisform.lstWP.ListIndex))+'.doc'
cDoc="'&mvTempPath"+cDoc+"'"
oWord = CreateObject("Word.Basic")
oWord.appmaximize
WITH oWord
if !file(&cDoc)
.FileNewDefault
.MailMergeMainDocumentType(0)
cODBCSource = "DSN=Visual Foxpro Database;SourceDB=&mvTempPath;;
SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;"
*** This is line where the error occurs.***
.MailMergeOpenDataSource("&mvTempMerge",0,0,0,0,"","",0,"","",;
m.cODBCSource,"SELECT * FROM MERGE", "")
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