Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with sending Outlook email in VFP
Message
From
27/06/2003 12:23:35
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00804758
Message ID:
00804762
Views:
27
Try this code
oOUTLOOK= Createobject('outlook.application')
omail=oOUTLOOK.createitem(0)
omail.recipients.add("xxxx@xxxx.com")
oRecipient.type = 3
*omail.recipients.Add(lcEmaillist)
omail.Display
Release  omail
oOUTLOOK = .Null.
Release oOUTLOOK

*oRecipients types
*1 = to
*2 = cc
*3 = bcc
>I have some sample code from a book on sending email from VFP using Outlook, which is below:
>
>Set proc to officapi (this is a bunch of lines of code I will not post unless needed)
>
>public oOutlook
>oOutlook = CreateObject("cusOutlookAutomation")
>oOutlook.show()
>oOutlook.New
>oOutlook.SetTo("yourname@domain.net")
>oOutlook.SetSubject("Test Message Subject")
>oOutlook.SetBody("This is body text")
>oOutlook.AddAttachment("c:\demo.txt")
>oOutlook.send
>
>
>The help I need is I simply want my app to have the user select email addresses that the email goes to (from my table) and then simply open an Outlook email with them in it BUT NOT SEND IT IMMEDIATELY. I want the user to then add their attachments and body of the message in Outlook so they can use Outlook's spell check and other features that they are custom to and want. When they are done they will click on Outlook’s “Send” button.
>
>Any suggestions would be appreciated.
>
>Regards,
>Torrey
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform