I don't think it will work with outlook. With CDO you communicate directly through the SMTP protocol to bounce an e-mail off to a destination. For Outlook, I would look at creating a connection to Outlook which will allow you to manipulate any part of Outlook. Outlook 2003 I noticed prompts about activity and verifies that the activity is to be done on your behalf.
Below is an example of using Outlook. It has a form that asks for the To, Subject and Body. The attachment was created before the form was called and had it passed to it.
oOutlookObject = CREATEOBJECT("Outlook.Application")
oEMailItem = oOutlookObject.CreateItem(0)
WITH oEMailItem
.To = THISFORM.txtTo.VALUE
.Subject = THISFORM.txtSubject.VALUE
.Body = THISFORM.edtMessage.VALUE + CHR(13) + CHR(13)
IF THISFORM.txtNumAttachments.VALUE > 0
.Attachments.Add(THISFORM.Attachment1)
ENDIF
.Send
ENDWITH
RELEASE oEMailItem
RELEASE oOutlookObject
Microsoft has information with OLE (old term). A lot of the information is for VB, but not too bad on translating it to VFP.
Thanks,
Warren Murphey
Previous
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