Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP/Outlook problems
Message
De
11/10/2002 10:25:26
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:
VFP/Outlook problems
Divers
Thread ID:
00710311
Message ID:
00710311
Vues:
59
I am using OLE automation with VFP and Outlook to create emails from VFP data using something like the code below...

* -----------------------------
lcHTMLString = my message formatted as html

lcHTMLString = lcHTMLString+ HTML body tag code
* can't show directly here as tags would be interperated as html!


oOutlook = CREATOBJECT('Outlook.application')
oItem = oOutlook.createitem(0) && create new mail message

WITH oItem
.recipients.add(emailaddress)
.subject = MySubject"
.HTMLBody = lcHTMLString
.save()
.send()
ENDWITH
* -----------------------------

If I select to send the emails immediately they are generated, the received emails look fine, but if I try to view the sent version (ie. the message stored in the 'out-tray'), the body of the email is blank! Is this because I have used the .HTMLBody property instead of .body?

I originally did use oItem.body to store the message, and that worked fine, until I needed to line-up some data halfway through the message and use a non-proportional font. Placing and in the text string did not work - it output literally, that's why I resorted to an HTML string solution.

a) If I use the .HTMLBody property, how can I view the emails before transmission?
b) If I use the .body property, how can I embed HTML formatting tags?


Any help would be appreciated.

Alan Harris-Reid
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform