Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending Mail Merge Documents via Outlook
Message
 
To
14/02/2002 14:20:17
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00619001
Message ID:
00620379
Views:
22
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform