Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
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", "")
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement