Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dispaying emails in Outlook
Message
De
19/10/2002 20:33:09
Alan Harris-Reid
Baseline Data Services
Devon, Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Dispaying emails in Outlook
Divers
Thread ID:
00713248
Message ID:
00713248
Vues:
52
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform