Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dispaying emails in Outlook
Message
From
19/10/2002 20:33:09
Alan Harris-Reid
Baseline Data Services
Devon, United Kingdom
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Dispaying emails in Outlook
Miscellaneous
Thread ID:
00713248
Message ID:
00713248
Views:
51
I am creating emails in VFP using code similar to that below...

* ----------------------------------------
oOutlook = CREATEOBJECT('outlook.application')

SELECT MyCursor
SCAN
oitem = oOutlook.CreateItem(0)

WITH oItem
.Recipients.Add('blinedata@aol.com')
.subject = "Test message "
.HTMLBody = lcMyHTMLString
.Save()
ENDWITH
ENDSCAN
* -----------------------------------------


Once the program has run I can manually activate Outlook and look at the emails and send them when I am ready, but...

a) The emails are being placed in the 'Drafts' folder in Outlook by default, how can I programatically send them to the Outbox folder instead?

b) Instead of having to click on Outlook in the button-bar to bring it forward, how can this be done programmatically? Using oItem.display I can see each individual message as it is created, but I do not want to interrupt the loop - I want to see all the messages once the SCAN/ENDSCAN loop has finished. Automating MS Word has something like oWord.show, is there an equivalent command for Outlook? Also, when the Outlook window is displayed, how can I programatically select the required folder?

Any help would be appreciated.

Alan Harris-Reid
Next
Reply
Map
View

Click here to load this message in the networking platform