Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Email attachment not current data
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00911281
Message ID:
00911331
Views:
21
I am using VFP6 and a hard document. I need to automate this process.

>For sure - someone may pop in with a solution. But, if you're using VFP 8, you can drive the whole process (step by step) from the command window with a friendly assist from the object browser.
>
>I think it has to be a hard document - but don't quote me!:)
>
>BTW: Is their a market for AP-42 (Chapter 5,7) compliance and fugitive reporting in Florida? I have a turnkey solution that bolts to a Pertro-Vantage database (another shameless plug) and produces incident audit sheets for you regulator types!:-)
>
>>I am mergeing data to a word document. This is the code which works fine until I try to email it.
>>
>>oMemoDoc.MailMerge.Execute()
>>
>>* reference the merged document prior to printing
>>oMergedDocument = oword.ActiveDocument
>>
>>IF nOut = 1  && going to the printer
>>	* print merged result
>>	oMergedDocument.PrintOut(.T.)
>>ELSE	&& going to outlook
>>	* get Mailto address and Subject and any Body text
>>	do form frmMailTo to lcMailToData with ThisForm.p_Bldg_Number
>>assert !empty(lcMailToData) message "TEST stop to look at email properties"
>>	if !empty(lcMailToData)
>>		* send the email
>>		lcMsg = ThisForm.m_Send_Email(lcMailToData,oMergedDocument)
>>	else
>>		lcMsg = "Send Email was CANCELED"
>>	endif
>>ENDIF
>>return lcMsg
>>
>>Since "oMergedDocument" is an object reference and not the complete path and file name, "oMail.attachments.add(oMergedDocument)" fails. Do I need to save the document after mail merge? If so, how(command)? Does it need to be deleted after process succeeds? if so, what is the command? I am having trouble finding these reference in the Office Automation book.
>>
>>Thanks, Chuck
Extreme Programming = Plan -> Design -> Code -> Test
Previous
Reply
Map
View

Click here to load this message in the networking platform