Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Back to VFP, so Outlook OLE hints requested
Message
From
20/07/2000 12:47:25
 
 
To
20/07/2000 10:25:48
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00393971
Message ID:
00394987
Views:
10
Thanks to everyone how helped on this, with the provided hints, and much searching of technet and MSDN, the solution follows:
* Folder Name Value *
* ---------------------- *
* Deleted Items 3 *
* Outbox 4 *
* Sent Items 5 *
* Inbox 6 *
* Calendar 9 *
* Contacts 10 *
* Journal 11 *
* Notes 12 *
* Tasks 13 *
* *
****************************************************************
#DEFINE CRLF CHR(13)+CHR(10)
#DEFINE TABC CHR(9)
SET OLEOBJECT ON

Local lto, lsubject, lbody && strings

&& These will come from db later today
lto = "Gottschewski LA@Comox" && Just got volenteers for further testing
lsubject = "Test"
lbody = "Yadda "
lbody = lbody + lbody

oMailOle = CREATEOBJECT("Outlook.Application")
NSOle = oMailOle.GetNamespace("MAPI")
oOutFolder = NSOle.GetDefaultFolder(4) && constant for outbox

oMailItem = oOutFolder.Items.Add()
with oMailItem
.To = lto
.Body = lbody
.Subject = lsubject
.save && This one lousy line is ESSENTIAL, or it won't work
.Send
endwith
Release oMailItem
Release NS0le
Release oMailOle
Previous
Reply
Map
View

Click here to load this message in the networking platform