Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending Mail Merge Documents via Outlook
Message
 
À
14/02/2002 14:20:17
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00619001
Message ID:
00620379
Vues:
23
Hi Tamar,
I appreciate all your help and I'm at my wits end. This is my code in a nutshell:

oWord=CreateObject("Word.Application")
oWordobj="oWord.WordBasic"
WITH &oWordObj
.FileNewDefault()
.
.
Processing
.
.
lcDSN="DSN=Visual FoxPro Tables;DBQ=C:\;DefaultDir=C:\;DriverId=536;UID=admin;"
lcSQL= "SELECT * FROM "+lcData
.MailMergeOpenDataSource(lcData,0,0,1,0,"","",0,"","",lcDSN,lcSQL,"")
.MailMerge(1,0,0,"","",0,1)
.FileSaveAS("abc.doc")
ENDWITH

Thru tracing I found that the value of .MailMergeMainDocumentType defaulted to -1 but then changed after the OpenDataSource statement to 0. Additionally, when I tried to use the code .mailmergetodoc, I got an error that the file has no merge fields in it! But when I try to fax or email to a client they can't open the file because it seems to be connected with the data source! Help. (and Thanks.)
Shuli
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform