Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP/Outlook problems
Message
From
11/10/2002 10:50:59
 
 
To
11/10/2002 10:25:26
Alan Harris-Reid
Baseline Data Services
Devon, United Kingdom
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00710311
Message ID:
00710323
Views:
12
Alan,

I would remove the save() line and see what happens...HMTLBody is the appropriate property for you to place the HTML. I have never had a problem seeing the HTML message in "Sent Items" folder from within Outlook. Do you have problems viewing HTML emails you receive?

Also, you can use the < pre> tag here to display HTML code:


>I am using OLE automation with VFP and Outlook to create emails from VFP data using something like the code below...
>
>* -----------------------------
>
>
>lcHTMLString = [<html><body>Hello <b>world!</b></body></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
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform